|
82 | 82 | /// ============================================================================
|
83 | 83 | /// Regex explanation:
|
84 | 84 | /// ============================================================================
|
85 |
| -/// (?<!\\) # Negative lookbehind to ensure "${" is not escaped. |
| 85 | +/// (?<!\\) # Negative lookbehind to ensure "${" is not escaped. |
86 | 86 | /// \$\{ # Matches the starting "${" literal
|
87 |
| -/// (?<value> # Named capture group "value" for the entire variable expression: |
88 |
| -/// (?<name> # Named capture group "name" for the variable name: |
| 87 | +/// (?<value> # Named capture group "value" for the entire variable expression: |
| 88 | +/// (?<name> # Named capture group "name" for the variable name: |
89 | 89 | /// [a-zA-Z] # Matches a single alphabet character
|
90 | 90 | /// [a-zA-Z0-9_]* # Matches zero or more alphanumeric characters or underscores
|
91 | 91 | /// ) # End of the named capture group "name"
|
92 | 92 | /// (
|
93 |
| -/// (?<accessor> # Named capture group "accessor" for array access: |
| 93 | +/// (?<accessor> # Named capture group "accessor" for array access: |
94 | 94 | /// (?:\[\d+\])+ # Non-capturing group for multiple occurrences of digits surrounded by square brackets
|
95 | 95 | /// |
|
96 | 96 | /// (?: # Non-capturing group for nested path access:
|
97 | 97 | /// \. # Matches a dot (for nested properties)
|
98 |
| -/// (?<path> # Named capture group "path" for nested property name: |
| 98 | +/// (?<path> # Named capture group "path" for nested property name: |
99 | 99 | /// [a-zA-Z]+ # Matches one or more alphabet characters
|
100 | 100 | /// [a-zA-Z0-9_]* # Matches zero or more alphanumeric characters or underscores
|
101 | 101 | /// (?: # Non-capturing group for optional array access:
|
@@ -155,7 +155,7 @@ final RegExp variableSyntaxIdentifierRegex =
|
155 | 155 | ///
|
156 | 156 | /// (?<!\\) # Negative lookbehind to ensure "${" is not escaped.
|
157 | 157 | /// \$\{? # Matches the starting "${" literal (optional)
|
158 |
| -/// (?<name> # Named capture group "name" for the variable name: |
| 158 | +/// (?<name> # Named capture group "name" for the variable name: |
159 | 159 | /// [a-zA-Z]+ # Matches one or more alphabet characters
|
160 | 160 | /// [a-zA-Z0-9_]* # Matches zero or more alphanumeric characters or underscores
|
161 | 161 | /// ) # End of the named capture group "name"
|
|
0 commit comments