Hi, @wing-yang, @peterjones, @mapje71 and All,
In the last part of my previous post, I proposed a regex which does not use any conditional statement :
(?x) ^ [^(\r\n]* (?: \( (\d{3}) \) | (?1) - ) (?1) - \d{4}
However, this regex can simply be improved by using the @peterjones’s look-behind structure, instead of the negative class character :
(?x) (?<!\() (?: \( (\d{3}) \) | (?1) - ) (?1) - \d{4}
which allows to get several occurences in a single line, as below :
abc (123)456-7890 def 123-456-7890 ghi
BR
guy038