- Single char alternation (e.g. a|b|c|d) in a RegExp can be simplified to use a character class ([abcd]) instead. This usually also provides slightly better matching performance. - Character escapes that are replaceable with the unescaped character without a change in meaning. Inside the square brackets of a character class, many escapes are unnecessary that would be necessary outside of a character class. For example the regex [\.] is identical to [.] - If several qualified expressions occur after the qualifier having been checked for nullable, they can be replaced with optional chaining
1.0 KiB
1.0 KiB