Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expressions

Status
Not open for further replies.

transparent

Programmer
Sep 15, 2001
333
GB
If

objRegExp.Pattern = &quot;<b>(.*?)<\/b>&quot;

detects <b>anything</b>

Why doesn't

objRegExp.Pattern = &quot;<a id=(.*?)>&quot;

detect <a id=anything>

Cheers
 
It does when I try it.
You might have a problem with non-greedy matching. The ? in the pattern is only properly interpreted by the reg exp engine which comes with IE 5.5+ If you are using the one which comes with IE 5, then you will have problems using ?

Hope this helps
Mark
 
Hmmm
On my development machine the version of vbscript.dll is 5.6.0.6626, and the pattern you posted works for me
If you have Visual Studio, there is a regular expression tester you can download as an add-in to VB6. I use it all the time.
It is at

about half way down the page.

If not, then maybe you could post your code in the asp page - maybe there's a problem there

Hope this helps
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top