From: Sylvester Keil Date: 2012-06-12T19:07:52+09:00 Subject: Non-Oniguruma script matching Dear all, is there any straight forward way of detecting certain scripts (e.g., Cyrillic or Chinese kanji) with a non-oniguruma regular expression in Ruby 1.8.7? I'm currently working on a cite processing library that needs to distinguish the script used in personal names in order to print them in the correct order. For that, I'm using the following regular expression: @romanesque = CiteProc.oniguruma { '^[\p{Latin}\p{Greek}\p{Cyrillic}\p{Hebrew}\p{Armenian}\p{Georgian}\p{Common}]*$' } || CiteProc.ruby_18 { # @todo improve fallback range /^[[:alpha:]\s[:punct:]]*$/u } The #oniguruma method yields the passed in block for Ruby 1.9 or if the oniguruma gem is installed; so basically, I am looking for a fallback pattern to use instead of the Oniguruma expression in case the 'oniguruma' gem is not installed on 1.8.7. Is it possible in 1.8.7. to define character ranges for multi-byte characters? Any pointers? Thanks! Sylvester