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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regexp

Status
Not open for further replies.

vasah20

Programmer
Feb 16, 2001
559
US
Code:
Dim re
set re = new regexp
re.ignorecase = true
re.Pattern = &quot;(<li>\s*)(.*?)(\s*(<\/li>)?)&quot;

str = &quot;<li>some list element</li>&quot;
str2 = &quot;<li>some other list element&quot;

re.replace(str,&quot;abc $2 def&quot;)
re.replace(str2,&quot;abc $2 def&quot;)

the above code seems to only work for str2, and not str1.

the full string that's being parsed looks like this:
<ol>
<li>something here
<li>something else here</li></ol>

I have no idea what could be wrong with my regexp.
TIA leo

------------
Leo Mendoza
lmendoza@garbersoft.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top