What regex pattern can be used to check to see if there is a string quote in a string?
example,
"bob said hi" //string 1
and he said "hello" //string 2
i want to make sure that string 1 or string 2 have quotes (opening and closing, together)
thanks
Printable View
What regex pattern can be used to check to see if there is a string quote in a string?
example,
"bob said hi" //string 1
and he said "hello" //string 2
i want to make sure that string 1 or string 2 have quotes (opening and closing, together)
thanks
This?
\".+\"
Which'll match ["Hello" world"] - wouldn't a non-greedy match be more appropriate?
\".+?\" (i.e. match ["Hello" world]
I am not ashamed of my avarice.