I have a list of messages where I'm searching in that message for 4 or 3 digit number, I then replace it with that number.
So my current Regex is
Find
(.*)([0-9]{3,4})(.*)\r
Replace
\2
However, the problem is with [0-9]{3,4} only takes the first 3 digit if there are 4 digits, so even if there is a 4 digit number sequence, it will just grab a 3 digit number. Which is what I don't want.
Is there a way to make it grab a 4 digit number if it can and only grab a 3 digit number if it can't find the 4 digit number in that line.
Thanks