Hi all,
I have a string with 2 possibilities:
1°) N° RCS 123456A N° TAHITI AB123456 CODE APE ANCIEN 1234X CODE APE NOUVEAU 1234Y N° CPS (employeur)
2°) N° RCS 123456A N° TAHITI 234AB CODE APE 1234X N° CPS (employeur)
I wish to recover only the highlighted bold chain (AB123456)
The chain's lenght and structure can change.
Before the chain, I'll always have TAHITI so the begining is easy, but for the end, I can have 2 ways.
1°) "CODE APE",
or
2°) "CODE APE ANCIEN ..... CODE APE NOUVEAU"
If I have the first way, I can use this expression "TAHITI\s?(.*[^\s])\s?CODE".
But this one doesnt work with my second one because I have 2 "CODE" in my string.
My question is ; what can it be the expression for the first one and the second one ?
Thanks in advance.
Regards