[thelist] ASP/RegExp

Chris Marsh chris at webbtech.co.uk
Thu Oct 3 11:59:10 CDT 2002


Josh

> Here is a great series of articles from 4GuysFromRolla about
> Regular Expressions
>
> http://4guysfromrolla.com/webtech/031500-1.shtml
> http://4guysfromrolla.com/webtech/031500-1.2.shtml
> http://4guysfromrolla.com/webtech/031500-1.3.shtml
>
> It's a three part series. Really helpful. Once you read this you will
> have no problems creating the regular expressions you need.

This is a nice set of tutorials, but doesn't really get specific enough
for my needs. For example:

sPattern = "<<wttoc>>.*<</wttoc>>"

sPattern matches "<<wttoc>>Hello There<</wttoc>>" as expected. It also
matches "<<wttoc>>Hello* There<</wttoc>>" as expected. It doesn't match
"<<wttoc>>Hello
There<</wttoc>>" as expected. If I wish to also match the latter case, I
would have thought that:

sPattern = "<<wttoc>>[\n.]*<</wttoc>>"

Would have proved successful, but now nothing is matched.

Regards

Chris Marsh





More information about the thelist mailing list