Brutal 164 Posted August 22, 2015 Report Share Posted August 22, 2015 Hi regex guys, Im struggling on this. (using helloinsomnias regex builder) I have a string that looks like this 1 | ... | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ... | 46 Results: 601-700 of 4526 Per Page: 20 50 100 of course that data changes per loop I am wanting to be able to set the final number before the word results into a var So, in this case, I'm just trying to get: 46 Any ideas? (or examples) Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 22, 2015 Report Share Posted August 22, 2015 Hi regex guys, Im struggling on this. (using helloinsomnias regex builder) I have a string that looks like this 1 | ... | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ... | 46 Results: 601-700 of 4526 Per Page: 20 50 100 of course that data changes per loop I am wanting to be able to set the final number before the word results into a var So, in this case, I'm just trying to get: 46 Any ideas? (or examples) Not sure if theres a line break there or not? Try this: \d+(?=\s\s\sResults) Quote Link to post Share on other sites
Brutal 164 Posted August 23, 2015 Author Report Share Posted August 23, 2015 man that worked perfectly - I really appreciate it. I'll reverse engineer it in the regex builder so that I understand it better and hopefully wont have to ask for much more help on my regex. Thanks again. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.