string : ----------------Page (0) Break----------------
(it can have any number inside parenthesis)
pattern : /?<=-{16}Page ()(\d+)(?=) Break-{16})/g
usage :
if(line.search( /?<=-{16}Page ()(\d+)(?=) Break-{16})/g )!=-1)
{
console.log(line);
}
error : SyntaxError: Invalid regular expression: /?<=-{16}Page ()(\d+)(?=) Break-{16})/: Nothing to repeat
Any help would be appreciated.
Thank You
Top comments (2)
Please read the markdown guide to format your post properly and make it readable thanks!
-{16}Page ((\d+)) Break-{16}
if you just want to extract number inside parenthesis, use (\d+)
please check on a tool like regexr.com/