I try to create a regular expression to match strings between quotes but it seem’s not working.
My RegExp:
\[shortanalytics\snumber=[0-9]+\stoptext="[A-Za-z]+"\sbottomtext="[A-Za-z]+"\sicon=[A-Za-z]+\]
Text to match:
[shortanalytics number=60 toptext="super test" bottomtext="test 2" icon=add]
>Solution :
You can try using the following one:
"([^"]+)"
Explanation:
"
: quote([^"]+)
: any character other than quote"
: quote
This will match any string between paired quotes, regardless of the content of the string between quotes.
In order to get your content, reference the first group of each match.
Try it here.