114 $breaks =
'[^\w\x80-\xff]';
118 $roman =
'(?=[MDCLXVI])M{0,4}(C[DM]|D?C{0,3})(X[LC]|L?X{0,3})(I[VX]|V?I{0,3})';
120 $reg =
'/^' . $roman .
'$|^' . $roman . $breaks .
'|' . $breaks
121 . $roman .
'$|' . $breaks . $roman . $breaks .
'/';
123 $matches = preg_split( $reg, $text, -1, PREG_SPLIT_OFFSET_CAPTURE );
127 if ( !isset( $this->mTables[$toVariant] ) ) {
129 . implode(
',', array_keys( $this->mTables ) ) );
131 $ret = $this->mTables[$toVariant]->replace( $m[0] );
132 $mstart = $m[1] + strlen( $m[0] );
134 $ret .= substr( $text, $mstart, $m[1] - $mstart );
135 $ret .= parent::translate( $m[0], $toVariant );
136 $mstart = $m[1] + strlen( $m[0] );