Open titouancreach opened 10 months ago
I made a feature request #227 about template literal matching support. Since your feature request is also related to strings, I thought that might be interesting to you. I also included a workaround that you might find useful, even though it might not be exactly what you are looking for.
@cyberixae Yes, it would solve 80% of my use cases
Is your feature request related to a problem? Please describe. I'm always frustrated when: I need to split the string manually after it matches
.startsWith
or.endsWith
or regex (matching group).For example I want to normalize phone number from a string So, if it start with a "0" or "0033" I want to replace this number with "+33" (country code), if it starts with "+33", it's Ok.
same with a regex:
Describe the solution you'd like I would like solution to match strings more like some other functionnal programming langage, example Elixir
Describe alternatives you've considered
Maybe select could be surcharged and select with a regex would give you "matches" (to be honest, I don't have a good idea of how it should be done)
or