Q: How to removes spaces with this RegEx 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?

A: Taking advantage of your current regex you only need to make a minor modification.
Instead of this one:
(?<=^(?:[^|]+ \| ){2})[^|]+

Use this one:
(?<=^(?:[^|]+\| ){2})[^| ]+

Here's the Regex hero to test it: http://regexhero.net/tester/?id=92183ab8-4fa4-4d9a-bd7b-278c11a77bd1
