-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
When you search for word1 word2 word3, you only get exact matches.
In regex you can search for word1[\s\S]*word2[\s\S]*word3 which will also match if there is other text in between the words.
According to an LLM, this should match the words in any order: ^(?=.*\bword1\b)(?=.*\bword2\b)...(?=.*\bword3\b).* but it gave me an error:
Regex(
Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
^(?=.*\bword1\b)(?=.*\bword2\b)...(?=.*\bword3\b).*
^^^
error: look-around, including look-ahead and look-behind, is not supported
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
),
)
I think it would be ideal if the normal search (so the one without regex) by default would match the words with anything in between, in any order.
Metadata
Metadata
Assignees
Labels
No labels