Regex help needed – match all after a hyphen

Apr 30, 2013 at 3:46pm

Regex help needed – match all after a hyphen

I’m trying to make a regex that matches all after a hyphen character. I have a coll that stores indices as symbols of “1-4″, “22-2″, etc. and I want to split them into the number before the hyphen and after with two regex objects.

My object for the characters before it works: regexp ([^-]*)-

regexp \-(.*) does not work, though my (limited) knowledge of regex says it should… anyone able to help?

#67966
Apr 30, 2013 at 3:50pm
– Pasted Max Patch, click to expand. –

Best, Jeremy

#244266
Apr 30, 2013 at 3:55pm

Thanks a ton Jeremy.

#244267

You must be logged in to reply to this topic.