Using [ ] square braces in Regex

Anyone with Regex skill tell me how to use square braces in regex. I am using the following to find:


to find all text between [LINK] and [/LINK]

Escape the square brackets with \.

As i was asking this question I was hoping Kem was online. Always good for Regex help, thanks Kem. I tried that and now have the following which does not seem to be working either


Can you post some sample text?


What I used this for
The following code was used to start my apache server from Xojo. I suspect you could replace the ‘sudo apachectl start’ code with any other command which requires sudo to run.

Dim sh as new Shell

sh.Execute “osascript -e ‘do shell script ““sudo apachectl start”” with administrator privileges’”

TextArea1.Text = TextArea1.Text + EndOfLine + sh.Result

You’re not putting the “#” and “#Usi” into the pattern, are you?

Yes, got it working with: