4ggr35510n 0 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 Share this post Link to post Share on other sites
sahsanu 28 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)) Share this post Link to post Share on other sites
PsaltyDS 39 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 Share this post Link to post Share on other sites
4ggr35510n 0 Posted August 4, 2010 PsaltyDS: yup sahsanu: nope Share this post Link to post Share on other sites