On Wed, 2003-06-04 at 14:16, Jacob Fugal wrote:
> In short summary, rather than quoting, the regex so far suggested has been:
>
> s/([^a-zA-Z]*)Booty([^a-zA-Z]*)/\1_Booty_\2/
>
> This should work AFAIK, but this should also work and IMO a little more
> flexible:
>
> s/(?<![a-zA-Z])Booty(?![a-zA-Z])/_Booty_/
Translation into PHP:
$str2 = preg_replace("/(?<![a-zA-Z])Booty(?![a-zA-Z])/i", "_Booty_", $str1);
And yes, it works. I tested it.
Steve
____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list