Wednesday, October 2, 2013

Non-greedy regular expression not working

\[[0-9a-zA-Z _]*\]


The above regex will work for all the test cases you had mentioned in your question. You may also use ^ if you want your text to start with [.


Thanks, Tariq.


No comments:

Post a Comment