I am trying to match [and ].
but the when we also use the two for regular expression,
how can I write some pattern to match the two brackets?
Using \[ does not work as it gives out compiler error for the following line:
regex(new Regex("([^.#; \\t\\r\n(){}\[\]',`\"][^; \\t\\r\\n(){}\[\]',`\"]*|[.][^; \\t\\r\\n(){}\[\]',`\"]+)"))
I’d go with
for the Regex.
The Regex would work fine as long as you won’t need to parse nested expressions as in