c# regular expression search, format the search prase if boolean AND,OR,NOT presents
i need to do search engine, its like string matching, if the search string consists of boolean text like AND,OR,NOT i have to format the search string according to the boolean logic..
eg:- search string is sach开发者_运维知识库in and lara or ponting, now i have to format the string without boolean keywords but the it accepts the and,or,not logics.
http://www.csa.com/help/Search_Tools/boolean_operators.html
already i posted one qustion regarding this , but now i have idea about the regular expression...
please help me..
Thanks in advance..
You could use some kind of capturing, like:
(?<Operator>(AND|OR|NOT))
But named captures are only in .Net: http://www.regular-expressions.info/named.html
精彩评论