Can I use the Kleene plus in the lookbehind in regexp?
What is the problem with this regular expression?
(?<=\[\[\w+\-).+(?=\]\])
If I want to select for example "hello" in this text
avaavasda sfdsfdf [[anything-hello]] dsfsdf sfsdfdsf
Can I use the Kleene plus in the lookbehind in regexp?
What is the problem with this regular expression?
(?<=\[\[\w+\-).+(?=\]\])
If I want to select for example "hello" in this text
avaavasda sfdsfdf [[anything-hello]] dsfsdf sfsdfdsf
NO you can't have a variable lookbehind, but you can do this in php:
\[\[\w+-\K[^\]]+(?=]])
the \K is like an amnesia pill (forget all that you have seen before me)