too wordy explanation
This commit is contained in:
parent
3a0b3f4e31
commit
bdb19f681e
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ The solution: `pattern:/"(\\.|[^"\\])*"/g`.
|
|||
Step by step:
|
||||
|
||||
- First we look for an opening quote `pattern:"`
|
||||
- Then if we have a backslash `pattern:\\` (we technically have to double it in the pattern, because it is a special character, so that's a single backslash in fact), then any character is fine after it (a dot).
|
||||
- Then if we have a backslash `pattern:\\` (we have to double it in the pattern because it is a special character), then any character is fine after it (a dot).
|
||||
- Otherwise we take any character except a quote (that would mean the end of the string) and a backslash (to prevent lonely backslashes, the backslash is only used with some other symbol after it): `pattern:[^"\\]`
|
||||
- ...And so on till the closing quote.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue