I have a problem with parsing some HTML code (table). I'm not too good with regular expression and I need help.
The HTML code is in vi. How to get marked ones in array using regexp?
Solved! Go to Solution.
There are hundreds of expressions that will match a result...
Something like this: "(?m)<td>\s*([0-9]+\.[0-9]+)". Then use the first capturing group.
No expression will give an array. You'd have to loop until the index is -1. Put the index in a shift register, and use it for the next iteration. Don't add the last element, or delete it.
EDIT: Use "(?m)<td>\s*([0-9]+\.?[0-9]*)". Or (?m)<td>\s*(\d[^<\s]+)
Simple cases like this are fine, but due to some unfortunate choices in the LV Regex function I often resort to Search and Replace to do the opposite job: instead of pulling out what you want in a loop, replace everything you don't want with an empty string.