Here is my Regex, I am trying to search all special characters so that I can escape them.
((|)|[|]|{|}|?|+|\|.|$|^|*|||!|&|-|@|#|\%|\_|"|:|<|>|/|;|'|`|~)
My problem here is, I don't want to escape some sepcial characters only when the come in a sequence
like this (.*)
So, Lets consider an example.
Sting message = "Hi, Mr.Xyz! Your account number is :- (1234567890) , (,*) &$@%#*(....))(((";
After escaping according to current regex what i get is,
Hi, Mr.Xyz! Your account number is :- (1234567890) , (,*) &$@\%#*(....))(((
But is don't want to escape this part (.*)
want to keep it as it is.
My above regex is only used for searching, So i just don't want to match with this part (.*)
and my problem will be solved
Can anyone suggest regex that doesn't escape that part of the string?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…