Copy link to clipboard
Copied
How do you match a hash character "#" in GREP? If I enter the symbol directly it is not seen as an ordinary character. I have tried with quotes and with a backslash as an escape, but to no avail.
Jason
I think the issue is with the use of \b, it will look for position after # and hence it won't match. Try something like the following
\b(return|function)\b|#include\b
-Manan
Copy link to clipboard
Copied
Here is basically what I have so far:
\b(return|#include|function)\b
This will match the strings return and function, but not the string #include.
Copy link to clipboard
Copied
I think the issue is with the use of \b, it will look for position after # and hence it won't match. Try something like the following
\b(return|function)\b|#include\b
-Manan
Copy link to clipboard
Copied
Thanks