Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to search for a phrase in opengrok containing curly brackets?

Tags:

opengrok

I have tried using something like "struct a {" and "struct a {" to look for the declaration of "a". But it seems opengrok just ignores the curly brackets. Is there a way to search for the phrase "struct a {"?

like image 650
Tony Avatar asked Oct 01 '22 21:10

Tony


2 Answers

Grok supports escaping special characters that are part of the query syntax. The current list of special characters are

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

To escape these character use the \ before the character. 
For example to search for (1+1):2 use the query: \(1\+1\)\:2
like image 130
Sunil Kartikey Avatar answered Oct 19 '22 05:10

Sunil Kartikey


You should be able to search with "struct a {" (with quotes)

like image 40
Badri Narayan Manicka Avatar answered Oct 19 '22 04:10

Badri Narayan Manicka