There is a question like this here asking about the first occurrence of "1" in each line, but in EditPad it doesn't work at all, even when I use the Multi-Line Search Panel.
I have Regex on, Highlight All on. All other functions are off.
- /^[^1\n\r]*(1)/m - highlights nothing
- ^[^1\n\r]*(1)/m - highlights nothing
- ^[^1\n\r]*(1) - finds all lines that contain "1" and highlights everything from the start of the line until the number "1". But I need only the first occurrence of "1", nothing else.
I guess that ^[^1\n\r]*(1) is one step towards the real "first occurrence", but it is not there yet.
For example, I have the number 5215681571
And I want to highlight only the first "1" in the line. The expression ^[^1\n\r]*(1) will highlight 521 which is not desirable.
I have tried also ^(^.*[^1])1 which finds every line that contains 1 and highlights everything from start until the last "1".
In stackoverflow, I have seen countless suggestions on how to achieve the first occurrence, but none of them works in EditPad. Any idea, please?