regular expression - matching a string

  • Thread starter Thread starter yoni
  • Start date Start date
Y

yoni

Hey
I need the regexp pattern to match a single quoted string. its a bit
tricky since double single quotes in the middle are part of the
string, and we should continue to capture till the next single quote.
an example:

'this is ''all'' one string!'

get it? who can help me?
thanks!
 
Hey
I need the regexp pattern to match a single quoted string. its a bit
tricky since double single quotes in the middle are part of the
string, and we should continue to capture till the next single quote.
an example:

'this is ''all'' one string!'

get it? who can help me?
thanks!

Does this work?
'([^']|'')*'

Christof
 
Hey
I need the regexp pattern to match a single quoted string. its a bit
tricky since double single quotes in the middle are part of the
string, and we should continue to capture till the next single quote.
an example:

'this is ''all'' one string!'

get it? who can help me?
thanks!

Try this

'(.*)'
 

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

Back
Top