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?

tchrist
  • 78,834
  • 30
  • 123
  • 180
Hosam Aly
  • 41,555
  • 36
  • 141
  • 182

1 Answers1

2
[^\p{Z}\p{C}]
Jeremy Stein
  • 19,171
  • 16
  • 68
  • 83
  • 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 Sep 09 '09 at 14:45
  • Yep. And if it ain't one of them, it's visible. – Jeremy Stein Sep 09 '09 at 15:40