--- Bryan Murdock <[EMAIL PROTECTED]> wrote:
> On Wed, 2003-06-04 at 11:00, Michael Ryan Byrd
> wrote:
> > > I'm looking to match a string every time it is
> not preceded or
> > > followed by a letter. 
> > 
> > hmmm. Would this work?
> > 
> > eregi_replace("[^a-z]*Booty[^a-z]*","_\\0_","your
> Booty String Here");
> 
> I don't know how php does regexps really, but the
> above seems to
> basically jive with the perl regexp I would suggest
> (and these both
> assume you know the string you want to match is
> exactly "Booty"):
> 
> s/([^a-zA-Z]*)Booty([^a-zA-Z]*)/\1NewBootyString\2/
> 
> or something like that.  I heard php and perl were
> similar...hope this
> helps.

I'm not very familiar with php, but wouldn't it be
easier just to do 's/\W+/ /g' to eliminate
nonalphanumeric characters?

-Jon



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to