Hello,
I am trying to only use formula tool for this. Basically i want to get an exact match from my regex expression.
input ex: SDF-TECES33V12-5Y
from this i would like to extract the numbers between S and V (might sometimes be 3 or 4 numbers)
so from this, for example, i would like to get only the number 33.
i tried using this:
REGEX_Replace([Name], "(?=S)(.*?)(?<=V)","$1")
thanks in advance for any help
Solved! Go to Solution.
Does this work?
I'm using \d+ because you want to get the numbers between S and V.
REGEX_Replace([Field1], ".*S(\d+)V.*", "$1")
Worked like a charm, many thanks!
By any chance could you help me getting the last two charcters? its always a number followed by Y
Tried using:
REGEX_Replace([Name], "\+dY","$1")
".*-(\d+)Y",'$1'
gets you 1 or more digits between - and Y
Hi,
Regex might not be the easiest way to get those characters. If it's always the last two digits you could use a left(right([name],3),2) in lieu of using a Regex. If you need to test for if the last character is a Y you can add an if right([name],1)=Y or a Trim.
You are right, that is much simpler
got it working, thanks!
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |