Yoav - edited to be clearer
Hi, I need to find 6 digit numerical strings in a text file. I'm working in C#. Example:
text text text123365 text text text
The expression must skip strings longer then 6:
text text text1233656 text text text
The above string should not return any result because the length of the digit string is 7.
I came up with this expression: [^0-9]([0-9]){6}[^0-9]
It works perfectly with the exception of string that are at the start or end of the line
123365text text text text text text
text text text text text text123365
Is it possible to identify these cases?
([0-9]{6})