I'm learning about regular expressions and trying to make an expression that will match only those strings which are written in double quotes and for that my expression is : "\S*"
and target string is <aname="Name4"text="Super">
but the expression is matching whole string after first double quoted string is found. I'm using this website for testing an expression
Asked
Active
Viewed 33 times
0

Harvey Clue
- 63
- 7
-
And what do you expect to match? Try `"\S*?"` – Wiktor Stribiżew Feb 06 '17 at 12:41
-
If you are trying to parse XML in JavaScript you would not use a RegEx, there are built in methods to do it correctly. – Alex K. Feb 06 '17 at 12:43
-
@WiktorStribiżew what does `?` mean. – Harvey Clue Feb 06 '17 at 12:43
-
The `*?` is a lazy quantifier matching zero or more occurrences of the quantified subpattern, as few as possible. – Wiktor Stribiżew Feb 06 '17 at 12:50