Originally Posted By: hybrid8
Originally Posted By: mlord
Quote:
gsub("[^- 'a-zA-Z0-9 _$+&={}\\[\\]()%@!;,.]*","")

Not sure about that one -- putting square brackets inside square brackets is ambiguous.

Ok, that's fair. So how do I allow them otherwise?

Oh, my apologies.. you already have them properly backslashed.
Note that, inside a [] construct, you can simply use [ instead of \\[, but still need to do \\] smile

smile


Edited by mlord (13/01/2009 23:18)