Is there a regular expression in Ruby that identifies Unicode punctuation (e.g., ",-)?
You can use this one:
/[[:punct:]]/
For more info check the Regexp class. You can also test it on this Rubular permalink
\p{P}
- not just in Ruby. See http://www.regular-expressions.info/unicode.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With