My regexp stupidity needs assistance before loose all my hair!

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top