Javascript regExp - find brackets
javascript, regex
Solution
Try it without the `'`
var regExp = /\[[1-9]\]/;
var search = string.search(regExp);
Problem
I can't figure out how to search for a string containing something like "[1]", for some reason this doesn't work: ``` var regExp = '/\[[1-9]\]/'; var search = string.search(regExp); // returns -1 ``` I've searched all over for a solution but can't find anything...