My input is
Engineering | AB7407 | 007412665 | Jackie Browne | Drawing for Construction
and the regex is
(?<=^(?:[^|]+ \| ){2})[^|]+
I am using the above RegEx to extract 007412665. It works, however it brings spaces before and after the value.
I tried /s but it did not remove the spaces. Any other idea?
Taking advantage of your current regex you only need to make a minor modification.
Instead of this one:
Use this one:
Here’s the Regex hero to test it: http://regexhero.net/tester/?id=92183ab8-4fa4-4d9a-bd7b-278c11a77bd1