elm / regex

If you really need regex in Elm, it is possible.
https://package.elm-lang.org/packages/elm/regex/latest/
BSD 3-Clause "New" or "Revised" License
33 stars 9 forks source link

Regex.Options.unicode #14

Open pravdomil opened 3 years ago

pravdomil commented 3 years ago

Usefull for example: "čočka".match(/\p{Letter}+/u)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes

miniBill commented 2 years ago

This is also relevant to the fact that Char.isLower only works for ASCII, a regex-based alternative could make use of those classes

omnibs commented 1 year ago

This is also relevant for sanely matching/stripping/replacing Emoji in Elm, with matchers like \p{Emoji}, \p{Emoji_Modifier}, \p{Emoji_Component}, \p{Emoji_Modifier_Base}, \p{Emoji_Presentation}.