View Full Version : Resolved Need help with regex

04-19-2012, 10:22 PM
Hey guys, I could use some help with some regex.

I have a set of concatenated numbers as such:


What I want to do is match a number, such as 26. I can't split the number (its a regex in MySQL, but the logic is what I'm interested in, not the application), so I need to detect $number with either a dash or start of line preceding and a dash or end of line after.

I tried a few things so far, none of which have worked, along the lines of:


But they all match both of the cases listed above. Anyone have thoughts as to how to tackle this?

EDIT: Resolve... as soon as I posted this, I realize the question mark was the problem... dropped it and it works...