in reply to Regular Expressions with varialbe with "[]"

Have a look at quotemeta.

  • Comment on Re: Regular Expressions with varialbe with "[]"