<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">NEVER MIND.  I figured it out:<div><br></div><div><font face="Monaco"><font color="#929000">; detects japanese characters<br>; contains-japanese-characters? str -> bool</font><br>(define (contains-japanese-characters? s)<br> (or (regexp-match #rx"[\u3041-\u3096]" s)  <font color="#929000">; Hiragana<br></font>     (regexp-match #rx"[\u30A0-\u30FF]" s)  <font color="#929000">; Katakana (Full Width)</font><br>     (regexp-match #rx"[\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6A]" s)  <font color="#929000">; Kanji</font><br>     (regexp-match #rx"[\u2E80-\u2FD5]" s)  <font color="#929000">; Kanji Radicals</font><br>     (regexp-match #rx"[\uFF5F-\uFF9F]" s)  <font color="#929000">; Katakana and Punctuation (Half Width)</font><br>     (regexp-match #rx"[\u3000-\u303F]" s)  <font color="#929000">; Japanese Symbols and Punctuation<br></font>     (regexp-match #rx"[\u31F0-\u31FF\u3220-\u3243\u3280-\u337F]" s)  <font color="#929000">; Misc. Japanese Symbols/Chars</font><br>     (regexp-match #rx"[\uFF01-\uFF5E]" s)))  <font color="#929000">; Alphanumeric and Punctuation (Full Width)</font></font></div><div><br>On Sep 16, 2014, at 09:22 , Geoffrey S. Knauth <<a href="mailto:geoff@knauth.org">geoff@knauth.org</a>> wrote:<br><br><blockquote type="cite">I'm writing a function to detect Japanese characters in a string. I found this page:<br> <br><a href="http://www.localizingjapan.com/blog/2012/01/20/regular-expressions-for-japanese-text/">http://www.localizingjapan.com/blog/2012/01/20/regular-expressions-for-japanese-text/</a><br> <br>So, for example, the example Perl regexp [\x{3041}-\x{3096}] would detect Hiragana characters (as would \p{Hiragana}).  How do I express such a Unicode range with Racket regexps?<br> <br>I looked at the docs below and it wasn't obvious to me how to do it.  In other languages there might be, for example, a \xnnnn or \uxxxx construct.<br> <br>http://docs.racket-lang.org/reference/regexp.html#%28elem._%28rxex._30%29%29<br> <br>--<br>Geoffrey S. Knauth | http://knauth.org/gsk<br> <br>____________________<br> Racket Users list:<br> http://lists.racket-lang.org/users<br></blockquote><br></div></body></html>