D
Douglas Livingstone
which will match anything inside of square brackets. This will match:
"This is a [fix]" $1 will equal "fix"
"This is a [ fix ]" $1 will equal " fix "
"This is a [ *sentence inside of a fix* ]" $1 will equal " *sentence
inside of a fix* "
Hmm... I wonder if he wants to match that much, what about this input text:
"I'm using square brackest in normal text [heh, this is fun![b.]]"
What do you want to match? "[heh, this is " or ""?
Playing on your one, perhaps this is what is needed: /\[([^\[\]\s]*)\]/
Douglas