W
Wole
Hi. I really need help with a regular expression in ASP. I need a regex
pattern that will grab a select or textarea tag in an HTML file. If I run
the pattern I should get
<select name="whatever">
<option value="a" selected>A</option>
<option value="b">B</option>
<option value="c">C</option>
</select>
Or
<textarea name="whatever">Here is some text area text</textarea>
I know the following pattern works:
<(select|textarea).*(.|\n)*?</(select|textarea)>
But the problem is my web hosting company is using ASP scripting engine 5.1
which does not support the non greedy delimiter (?). I doubt they are going
to upgrade to 5.5 anytime soon. I'll appreciate it if anyone can give me a
pattern that does the same job but does not use the ? delimiter. Is there a
way I can tweak the pattern above so that it works in ASP scripting engine
5.1? Thanks in advance.
pattern that will grab a select or textarea tag in an HTML file. If I run
the pattern I should get
<select name="whatever">
<option value="a" selected>A</option>
<option value="b">B</option>
<option value="c">C</option>
</select>
Or
<textarea name="whatever">Here is some text area text</textarea>
I know the following pattern works:
<(select|textarea).*(.|\n)*?</(select|textarea)>
But the problem is my web hosting company is using ASP scripting engine 5.1
which does not support the non greedy delimiter (?). I doubt they are going
to upgrade to 5.5 anytime soon. I'll appreciate it if anyone can give me a
pattern that does the same job but does not use the ? delimiter. Is there a
way I can tweak the pattern above so that it works in ASP scripting engine
5.1? Thanks in advance.