rocket976 62 Posted April 23, 2014 Report Share Posted April 23, 2014 Need a little regex help with look ahead (I think)Trying to get all numbers up to an underscore "_" for ex 146973095502995_234698373397133 So hoping to get 146973095502995_ or better yet 146973095502995 AND Then would also need the regex to match all characters after the underscore "_" _234698373397133 or better yet 234698373397133 best ive came up with is ^[a-zA-Z0-9_]+$ but that just gets the entire string Thanks for reading Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted April 23, 2014 Report Share Posted April 23, 2014 Here's one way to do it. set(#numberVar, $replace($find regular expression("146973095502995_234698373397133", "[0-9]\{15,20\}_"), "_", ""), "Global") Quote Link to post Share on other sites
rocket976 62 Posted April 23, 2014 Author Report Share Posted April 23, 2014 Thanks that works , I can also replace it out of the original var to get the second part , the after _ , much appreciated. 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.