File: regex.rb

package info (click to toggle)
ruby-uc.micro-rb 1.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 112 kB
  • sloc: ruby: 76; makefile: 7
file content (11 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
module UCMicro
  module Categories
    module Cf
      # original REGEX = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/

      # Ruby can't handle surrogate pairs and considers those ranges (xD800-xDFFF) as "invalid".  remove them for now
      # http://stackoverflow.com/a/397285/2781043
      REGEX = /[\u00AD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]/
    end
  end
end