typeleven 0 Posted July 15, 2010 I feel like I'm missing something very obvious here. I have this line... StringRegExp("tt1234567 tt1231234 4242424","(?:tt)[0-9]{7}",3) and I get this result (as an array): tt1234567 tt1231234 but shouldnt I get this? 1234567 1231234 I want to strip out that "tt" and only get things that started with "tt" in the string. Share this post Link to post Share on other sites
Mat 376 Posted July 16, 2010 (edited) Because you have no matching groups, the whole match is returned. You want to return a group that contains [0-9]{7}, so group it Because you've done that, you don't need to have a non-matching group for the tt.StringRegExp("tt1234567 tt1231234 4242424","tt([0-9]{7})",3)I hope you can understand that... I seem to be talking complete gobbledegook when it comes to explaining programming in words, I was showing my design for a new cricket club website to the first team captain, and after explaining the whole way the database is structured for comments he said "So a bit like facebook then?", I could have said "You can comment a bit like facebook." and that would be all Mat Edited July 16, 2010 by Mat AutoIt Project Listing Share this post Link to post Share on other sites