in reply to Replace strings with []

See quotemeta.

Your a[0] is a valid regular expression and means "match an a, and then match a zero. quotemeta is what you need to make a literally matching string of your variable.

Replies are listed 'Best First'.
Re^2: Replace strings with []
by jess195 (Novice) on Oct 13, 2013 at 12:42 UTC

    It works... Thanks!