RE: regular expression search and replace

"Richard Lindsey" <[email protected]> Wed, 7 Sep 2005 08:36:22 -0500
Newsgroups gmane.games.devel.mud.rom
Message-ID <[email protected]>
[snip]
Usually '$' is the end-of-string marker.  '&' doesn't have any special
meaning in regular expressions that I can think of.
[/snip]

Ahhhhhhhh yes that's right, I'm always getting those 2 confused :D Must
be some form of coding dyslexia :D

Richard Lindsey.

-----Original Message-----
From: Michael Barton [mailto:[email protected]] 
Sent: Wednesday, September 07, 2005 2:39 AM
To: [email protected]
Subject: Re: regular expression search and replace

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
-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom