929
Views
4
Comments
Solved
Regex search - trying to find this special character \
Question

Hi 


I am having issues to find out  a particular character in a string. I have used the Regex Search, and I want to find if a particular character appears on it . The character is \ .


It issues an warning as : "parsing ""^\"" - Illegal \ at end of pattern."   




2016-04-21 20-09-55
J.
 
MVP
Solution

err, you should escape the backslash with a backslash, since it's a special (escape) character

I suggest to test your regex with https://regexstorm.net/tester for example.


2016-07-12 16-07-47
Jorge Almeida

thanks. solved. :)


UserImage.jpg
jovan lee

"how do i check if [ ] exist in strings using regex search


2019-08-23 15-31-56
Scott Kulas

Like above, escape each of the characters with a backslash.

\[\]

Here's an example. https://regex101.com/r/2bph06/1


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.