847
Views
4
Comments
regex search
Question

what pattern do i add into regex search to check for [ ] in strings?

2020-09-01 10-42-42
Stefano Valente

https://regex101.com/

nice site to try out your regex expressions.

i believe you have to put a \ before it bytheway.

2024-12-17 14-32-59
Matthias Preuter
 
MVP

Maybe this cheat-sheet can help you

https://www.rexegg.com/regex-quickstart.html


2022-07-24 08-50-37
Gokula Kannan P

Hi Joveen,

    anywhere in string [ or ]

    /[[\]]/g

    Exact match in string 

    /[[]]/ig


i hope this helps

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Jovan,

You use the escape character backslash: \[ for [ and \] for ]. However, like others pointed out above, a simple Google search would've gotten you the answer (in less time than posting on the forum).

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