={1,3}?
Non-Greedy n through m
{x,y} = match the preceding element x - y times.
1 is the minimum number of characters to match.
3 is the maximum number of consecutive characters to match.
? = nongreedy
#1
|
|||
|
|||
How do find a separate number of characters?
How do find a separate number of characters?
Incorrect pattern because it matches all characters!
Spoiler:
={1,3}?
Non-Greedy n through m {x,y} = match the preceding element x - y times. 1 is the minimum number of characters to match. 3 is the maximum number of consecutive characters to match. ? = nongreedy
Spoiler:
= (1 char) == (2 char) === (3 char) ==== ===== ====== (6 char) |
#2
|
||||
|
||||
why the ?
so more than = are not allowed? ^={1,3}(?![=]+)
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
Because 3 characters are unified everywhere. But that I could make a mistake anywhere, now I can correct it quickly.
This pattern is also correct: For example: The minimum / maximum number of characters is 3. In this case. ^(=){3,3}$ |
|
|