4ggr35510n Posted August 4, 2010 Posted August 4, 2010 (edited) I'd like to get all "2" numbers from string:123123<table>123123</table>123123Is it possible to do it with just one RegExp pattern?(?:<table>.*?)([0-9]*)(?:</table>) returns all number between table tags, so I can simple get "2" out of them.In this situation, my question becomes purely theoretical, but... from 2 hours all what I'm doing is trying to figure it out with just one pattern. I'm rly tired of my own curiosity, so I'm asking for ur help ;](?:<table>.*?)([2])(?:.*</table>) returns only first "2", while (?:<table>.*)([2])(?:.*?</table>)only the last one (maybe not visible on example I've chosen), so I'm getting closer to just-one-pattern-solution, but It's still not it :/Please help Edited August 4, 2010 by 4ggr35510n
sahsanu Posted August 4, 2010 Posted August 4, 2010 I'd like to get all "2" numbers from string: 123123<table>123123</table>123123 Is it possible to do it with just one RegExp pattern? Maybe I didn't understand you but... #include <array.au3> $string = "123123<table>123123</table>123123" $result = StringRegExp($string,"2",3) _ArrayDisplay($result) MsgBox(0,"","String: " & $string & @CRLF & "Number of 2's: " & UBound($result))
PsaltyDS Posted August 4, 2010 Posted August 4, 2010 I think he only wanted the 2's between the table tags (should get two results vice six). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now