I'm trying to count the amount of times a character in a single line appears to then edit the lines which it does.
Say i have a line that goes:
\serv\file\subfile\subsubfile\subsubsubfile
Is there any way I can count the amount of times the \
character appears, and if it doesn't appear more than say twice, clear the line and leave it blank?
find ^([^\\]*[\\]?[^\\]*){0,2}$
replace with empty string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With