I have two conditions in my regular expression. Say,
- (.*text.*)---> which will check whether the input string has the substring "text" in it.
- (^((?!query).)*$)----> which will check whether the input string does not contains the word "query" int it.
Both are working fine for me.
But I want a regular expression to check both the conditions using something like AND operator.
I want a regex which should return true only if the input string contains the substring "text" and does not contains "query" in it.
I got the info that regex does not support AND operator.
So, I tried to do something like the following:
NOT(NOT(expression 1)|(NOT(expression 2)))
eg:- (!(.*query.*)|(^((?!text).)*$))
But even this does not work for me..
Anyone please help me regarding this.
 
     
    