8000 More concise regex, any way? · Issue #14 · wimpyprogrammer/strings-to-regex · GitHub
[go: up one dir, main page]

Skip to content
More concise regex, any way? #14
Open
@jiangweiatgithub

Description

@jiangweiatgithub

Given the following strings:
My Work 1
My Work 2
My Work 3
His Work 1
His Work 2
His Work 3
Their Work 1
Their Work 2
Their Work 3
The generated regex is:
/(My Work (1|2|3)|His Work (1|2|3)|Their Work (1|2|3))/

Is there any way to improve it to:
(My|His|Their) Work (1|2|3)
?

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0