I have a list like following:
ABC
GFGFG
/////////////////////////
ggtrgrh
htrhrth
nbtnyumjyumu
myuuykukyyuk
/////////////////////////
/////////////////////////
AAAAA
AAAAAAAAAAA
RET5t4yy
HTH^565y56y
/////////////////////////
tertet
/////////////////////////
/////////////////////////
/////////////////////////
now I want to bookmark consecutive lines that have /////////////////////////
this mean in above list only three last lines
and lines between myuuykukyyuk
and AAAAA
must select by regex.
I tried following regex but not working for me:
(?:.*/{25,}\r?\n?){3}
^/*/{25,}$
where is my regex problem?
I want to only match two or more lines that only contain 25 or more slashes
You can use
^/{25,}(?:\R/{25,})+$
See the regex demo.
Details:
^
- start of a line/{25,}
- twenty-five or more forward slashes(?:\R/{25,})+
- one or more repetitions of
\R
- any line break sequence/{25,}
- twenty-five or more forward slashes$
- end of a lineSee the screenshot with demo and settings: