source-class-Com.Tecnick.Unicode.Data.Pattern

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
 1: <?php
 2: /**
 3:  * Pattern.php
 4:  *
 5:  * @since       2011-05-23
 6:  * @category    Library
 7:  * @package     UnicodeData
 8:  * @author      Nicola Asuni <info@tecnick.com>
 9:  * @copyright   2011-2015 Nicola Asuni - Tecnick.com LTD
10:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
11:  * @link        https://github.com/tecnickcom/tc-lib-unicode-data
12:  *
13:  * This file is part of tc-lib-unicode-data software library.
14:  */
15: 
16: namespace Com\Tecnick\Unicode\Data;
17: 
18: /**
19:  * Com\Tecnick\Unicode\Data\Pattern
20:  *
21:  * @since       2011-05-23
22:  * @category    Library
23:  * @package     UnicodeData
24:  * @author      Nicola Asuni <info@tecnick.com>
25:  * @copyright   2011-2015 Nicola Asuni - Tecnick.com LTD
26:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
27:  * @link        https://github.com/tecnickcom/tc-lib-unicode-data
28:  */
29: class Pattern
30: {
31:     /**
32:      * Pattern to test RTL (Righ-To-Left) strings using regular expressions.
33:      * (excluding Arabic)
34:      */
35:     const RTL = "/(
36:           \xD6\xBE                                             # R
37:         | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4]                 # R
38:         | \xDF[\x80-\xAA\xB4\xB5\xBA]                          # R
39:         | \xE2\x80\x8F                                         # R
40:         | \xEF\xAC[\x9D\x9F\xA0-\xA8\xAA-\xB6\xB8-\xBC\xBE]    # R
41:         | \xEF\xAD[\x80\x81\x83\x84\x86-\x8F]                  # R
42:         | \xF0\x90\xA0[\x80-\x85\x88\x8A-\xB5\xB7\xB8\xBC\xBF] # R
43:         | \xF0\x90\xA4[\x80-\x99]                              # R
44:         | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3]        # R
45:         | \xF0\x90\xA9[\x80-\x87\x90-\x98]                     # R
46:         | \xE2\x80[\xAB\xAE]                                   # RLE & RLO
47:         | \xE2\x81\xA7                                         # RLI
48:         )/x";
49: 
50:     /**
51:      * Pattern to test Arabic strings using regular expressions.
52:      * Ref: http://www.w3.org/International/questions/qa-forms-utf-8
53:      */
54:     const ARABIC = "/(
55:           \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA]  # AL
56:         | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF]             # AL
57:         | \xDA[\x80-\xBF]                               # AL
58:         | \xDB[\x80-\x95\x9D\xA5\xA6\xAE\xAF\xBA-\xBF]  # AL
59:         | \xDC[\x80-\x8D\x90\x92-\xAF]                  # AL
60:         | \xDD[\x8D-\xAD]                               # AL
61:         | \xDE[\x80-\xA5\xB1]                           # AL
62:         | \xEF\xAD[\x90-\xBF]                           # AL
63:         | \xEF\xAE[\x80-\xB1]                           # AL
64:         | \xEF\xAF[\x93-\xBF]                           # AL
65:         | \xEF[\xB0-\xB3][\x80-\xBF]                    # AL
66:         | \xEF\xB4[\x80-\xBD]                           # AL
67:         | \xEF\xB5[\x90-\xBF]                           # AL
68:         | \xEF\xB6[\x80-\x8F\x92-\xBF]                  # AL
69:         | \xEF\xB7[\x80-\x87\xB0-\xBC]                  # AL
70:         | \xEF\xB9[\xB0-\xB4\xB6-\xBF]                  # AL
71:         | \xEF\xBA[\x80-\xBF]                           # AL
72:         | \xEF\xBB[\x80-\xBC]                           # AL
73:         | \xD9[\xA0-\xA9\xAB\xAC]                       # AN
74:         )/x";
75: }
76: 
 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy