Hi
I am trying to get the following RegEx output
I have tried the RegEX tool using following expression: \u{3}_(\w+)_(\d{8})\.*\s\w+_\w{2}:\s(\d{5})\.*. Unfortunately, unsuccessful. Can someone pls help?
Many thanks,
Solved! Go to Solution.
Hi @SylviaK ,
You can use the following regex expression.
\u{3}_([^_]+).*?(\d{8}).*?(\d{5})
The ? is a lazy character that means it will form the smallest string until it finds \d{8} or \d{5}. The second case guarantees it will get the first 5 numbers from your string.
Best,
Fernando V.
Beautiful! It works. can you please explain this expression: ([^_]+)
Many thanks.
Sure!
[] is a group of possibilities
^ means not
+ 1 or multiple times
[^_]+ means everything but a _. It will get everything until it finds a _
If you have [123], it means the character can be 1, 2 or 3, but if you have [^123], it means everything but 1, 2 or 3.