Given the string: "+49 ( 0 ) 162 12345 0162"
And the regex: ^(+\s*4\s*9\s*(\s*0\s*)|+\s*4\s*9|0\s*0\s*4\s*9|0|(\s*0\s*))\s*(15|16|17)
It matches: "+49 ( 0 ) 16"
Now I want to replace everything before 16, so that results in "162 12345 0162".
I have so far:
Regex regex = new Regex( @"^(\+\s*4\s*9\s*\(\s*0\s*\)|\+\s*4\s*9|0\s*0\s*4\s*9|0|\(\s*0\s*\))\s*(15|16|17)");
string result = regex.Replace( "+49 ( 0 ) 162 12345 0162", "" );
But that returns "2 12345 0162".
Thank you!
