Sample code here:
http://ideone.com/IUAwc5
In the regular expression, you will see two lines:
(?<!\\d(?:р|г|к)\\.) # (?<!\\d[ргк]\\.)
By common sense, they mean the same thing, but if you uncomment the second and comment out the first, then as a result of the work, we will see that line wrapping was made after 101p. 50. 2020 , that is, the second expression does not work.
And I observe this behavior not only in PHP, but also in Python.
Is there a reasonable explanation for this, or is this some kind of magic?
\\.
and a bunch of negative lookbehind assertions (which should stand before the template with which you are mapping, and not after). - alexlz