• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Extract all <option value="whatever">Data I want</option> from a text file

Rowboat

Senior member
Just what the title says, I have a text file and just want to be able to find all the available options which are surrounded by an option tag.

The server returned all the data on a single line in case that matters.

Thanks for looking
 
# Assuming the line is in $line, this should print what's between options.
for $i ($line =~ /<option[^>]*>(.*?)<\/option>/g) { print $i,"\n"; }
 
Wonderful, thanks for that I will lock it away for next time.

I didn't make it back to this thread until now so i ended up hacking it up by doing a split on the closing option tag which moved everything to its own line and then i could use the methods I knew already.

Thanks so much for the reply
 
Back
Top