- Oniguruma, ruby 1.9 in other words, does not handle regular expressions with the length undetermined within look-backward:
- (?<=something) -- works
- (?<=something.+) -- does not work
It hit me. Look-forward/-backward feature is one of the most frequently used for my jobs. Hidemaru as well as .NET Framework support such regular expressions within the look-backward feature. I wonder why Oniguruma does not support it.
But it is very good for me that Oniguruma supports "character code classes" just like .NET Framework. Aggregating every language's delimiter and punctuation among the various UTF-8 code table is very boring and complicated. Character code classes dramatically reduce the size of it. \p{ } is just a placeholder for the classes:
But it is very good for me that Oniguruma supports "character code classes" just like .NET Framework. Aggregating every language's delimiter and punctuation among the various UTF-8 code table is very boring and complicated. Character code classes dramatically reduce the size of it. \p{ } is just a placeholder for the classes:
- \p{Lu} -- represents any uppercase letters including Cyrillic and Greek.
- \p{P} -- represents any punctuations including .,:[].
0 件のコメント:
コメントを投稿