in my previous post:
search and replace : how does [url=http://somewhere] work?
i was asking about search and replace,
the essence of the question is
if i seach for the pattern {:tag:}
where tag is a specified name such as 'text'
{:text:}
and there can be whitespace and more text after x, but before the colon
{:tag extraStuff)
{:text bold:}
{:username red:}
is there a way i can use regular expressions
1: to find the pattern,
2: extract the 'extraStuff',
3: put together a new string using the extraStuff
4: then replace the tag with the new string?
if it makes any difference i can
change the format of the tag
eg
{:tag: extraStuff}
or
{:tag:}#extraStuff#
whatever works and is straight forward
cheers, mat
guidence through the swamp of regular expressions
Moderator: General Moderators
-
compound_eye
- Forum Newbie
- Posts: 15
- Joined: Wed Mar 17, 2004 8:42 pm