NEVER MIND. I figured it out:
; detects japanese characters
; contains-japanese-characters? str -> bool
(define (contains-japanese-characters? s)
(or (regexp-match #rx"[\u3041-\u3096]" s) ; Hiragana
(regexp-match #rx"[\u30A0-\u30FF]" s) ; Katakana (Full Width)
(regexp-match #rx"[\u34
I'm writing a function to detect Japanese characters in a
string. I found this page:
[1]http://www.localizingjapan.com/blog/2012/01/20/regular-expre
ssions-for-japanese-text/
So, for example, the example Perl regexp [\x{3041}-\x{3096}]
would detect Hiragana characters (as would \p{Hiragana}).
2 matches
Mail list logo