'The qt creator IDE doesn't support multiline regex search

I used the "Search Results" window to search for some contents of "CMakeLists.txt", and I selected the "Use regular expressions", and the regex is

 (add_executable|add_library|target_link_libraries)\s*\(.*mylib.*\)

but \s of regex doesn't match \n. I changed \s to ., it didn't match. I added (^m) in front of the regex, but it still didn't match.

Is this a bug of Qt Creator IDE? Can I use another tool or plugin of Qt Creator supporting multi-line searching?



Solution 1:[1]

It's very common for regex engines to be unable to handle multi-line matches irrespective of \n matching or the /m modifier. More unusual for them to handle them successfully, in my experience. You're probably out of luck.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 chaos