mIRC Home    About    Download    Register    News    Help

Print Thread
#104343 02/12/04 02:11 AM
Joined: Dec 2002
Posts: 68
P
Babel fish
OP Offline
Babel fish
P
Joined: Dec 2002
Posts: 68
Why is this returning 0?

Code:
$regex(<option value="SIT">Slovenia, Tolar (SIT)</option>,<option value="([a-zA-Z]+)"[\w]*>(\w+)</option>)


It looks right to me.

Thanks for any help.

#104344 02/12/04 04:27 AM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
The comma, like in all identifiers, is splitting up the string into 2 different parameters. Try this:

Code:
$regex(<option value="SIT">Slovenia $+ $chr(44) Tolar (SIT)</option>,<option value="([a-zA-Z]+)"\w*?>(.+?)</option>)


I changed \w+ to .+? since Slovenia, Tolar (SIT) doesn't just consist of word characters but also a comma, parentheses and spaces. Also, [\w]* can be \w* but I added the ? to make it non-greedy, so it doesn't capture as much text as possible


Link Copied to Clipboard