views:

126

answers:

1

According to the documentation of java.util.Pattern, the POSIX character class \p{Graph} ([:graph:] in POSIX notation) matches "a visible character: [\p{Alnum}\p{Punct}]". However, this is limited to ASCII characters only. Is there an equivalent class or expression for matching (visible) Unicode characters?

+1  A: 
[^\p{Z}\p{C}]
Jeremy Stein
According to the Unicode Regular Expressions standard, this expression means "anything other than a separator and a control character." http://www.unicode.org/reports/tr18/#Categories
Hosam Aly
Yep. And if it ain't one of them, it's visible.
Jeremy Stein