Here you go:
[*]{3} ==> three stars
\s+ ==> one or more space characters (tab, space, newline, return)
(.*?) ==> any number of characters (non greedy: smallest string to match
the regexp)
\s+ ==> idem
[*]{3} ==> idem
(.*?) ==> idem
(?= ==> positive lookahead (has to be followed by, doesn't remember the
group for backreferencing)
([*]{3}\s+.*?\s+[*]{3}) ==> explained before
| ==> OR
$ ==> end of string
) ==> end positive lookahead

\d{1,2} ==> one or two digits
/ ==> slash
\d{2} ==> two digits
And so on

You may want to read a bit about regexp. I heard good things about Ben's
book. I've ordered it myself (to use and recommend in my classes), but
it has a hard time getting to Belgium so I haven't read it yet. There is
also http://www.regular-expressions.info/ as an online resource.

Pascal Peters
Certified ColdFusion MX Advanced Developer
Macromedia Certified Instructor
LR Technologies
Av. E. De Mot, 19
1000 BRUSSELS, BELGIUM

> -----Original Message-----
> From: cf coder [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 18 mei 2004 14:26
> To: CF-Talk
> Subject: Re: help with string manipulation (Find,Replace)
>
> I agree with Pascal, regexps are the most powerfull tools
> when it comes to parsing, however they are not easy to code.
> Pascal I was wondering if you could explain what your code is doing:
>
> commentRegexp =
> "[*]{3}\s+(.*?)\s+[*]{3}(.*?)(?=([*]{3}\s+.*?\s+[*]{3})|$)";
> timestampRegexp = "\d{1,2}/\d{2}/\d{4}\s+\d{2}:\d{2}:\d{2}";
>
> Many thanks
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to