- [0-9] could be replaced with \d
- ($|&|\s) could be simplified to [$&\s] or to ([$&\s]) if you need capturing
- a*.* could be simplified to just .*
- similarly, a+.* could be simplified to .*
- non-capturing group (?:foo) has slightly better performance than capturing (foo)
- {0,1} could be replaced with ?
- {1} could be omitted
Комментариев нет:
Отправить комментарий