Hi there,
I want to select a <select> field from a remote form using regular expressions. If I did a regular expression on the following HTML code...
<select name=name>
<option value=1>1</option>
<option value=2>2</option>
</select>
...any old HTML code here
<select name=name_two>
<option value=1>1</option>
<option value=2>2</option>
</select>
... using "(<select[>]>).(</select>)" .. I'm going to wind up grabbing BOTH select elements because PHP is "greedy" for the largest string.
What I really need to say in regular expression language is, "find <select then text, then a '>', then any string EXCEPT </select>, then finally </select>."
I know this means [a] means any character but a, for example, but how do I specify "a string, then any string except a specific string, then the string"?
The answer is probably easy I'm just not thinking of it right now.