Re: regular expression search and replace

Michael Barton <[email protected]> Wed, 7 Sep 2005 02:39:26 -0500
Newsgroups gmane.games.devel.mud.rom
Message-ID <[email protected]>
On 9/6/05, Richard Lindsey <[email protected]> wrote:
> And I'd just like to add my \s* into that regex, because a lot of people
> put a space between the opening parentheses and their text, like
> REMOVE_BIT( ch->act, PLR_WHATEVER ), and so with the regex below, you

Good point, didn't think about that.  I hate those spaces.

> then that should compensate for any amount of whitespace... also, should
> the ampersand be escaped? I know it had to be in vi in order to work
> correctly, and regexes generally use that as an end-of-string marker
> similar to the beginning-of-string ^ marker... Just 2 additional cents

Usually '$' is the end-of-string marker.  '&' doesn't have any special
meaning in regular expressions that I can think of.
-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom