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_/
I should also mention that Jacob's regex is more accurate. The first regex will match Bootylicious. If the *'s are removed, then it will not match Bootylicious, but it will also not match Booty at the beginning or end of a string. So Jacob's is a more "correct" way to do it. Steve ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
