I don't like this syntax. It seems overly bloated compared to the equivalent regex. Your example also doesn't include grouping, which is vital to extracing information from regex parsed strings. It also doesn't show how counted repitions, like in the regex graphic, would be used.
I'm afraid this would be ridiculously verbose for non-trival expressions.
Personally I kind of see it per project, how much it'll be used and on the language in general. For some minor usage of it without having to make something overly complicated I find this would be perfect for what is needed. However I do agree with your points, some of my projects (Java and C# specifically) I've stuck with standard Regex due.
Perhaps there is a happy middle ground. Certainly when I'm doing basic matching I definitely prefer functions like endsWith, contains and startsWith compared to the equivalent regex.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't like this syntax. It seems overly bloated compared to the equivalent regex. Your example also doesn't include grouping, which is vital to extracing information from regex parsed strings. It also doesn't show how counted repitions, like in the regex graphic, would be used.
I'm afraid this would be ridiculously verbose for non-trival expressions.
Personally I kind of see it per project, how much it'll be used and on the language in general. For some minor usage of it without having to make something overly complicated I find this would be perfect for what is needed. However I do agree with your points, some of my projects (Java and C# specifically) I've stuck with standard Regex due.
Perhaps there is a happy middle ground. Certainly when I'm doing basic matching I definitely prefer functions like
endsWith
,contains
andstartsWith
compared to the equivalent regex.