in reply to Re^2: How to enforce match priority irrespective of string position
in thread How to enforce match priority irrespective of string position
Other than that, |-or conditions with swallowing can prioritize areas, like "quoted" ones. demo
DB<132> $_ = 'phrase. "phrase1.phrase2" phrase. phrase' 0 'phrase. "phrase1.phrase2" phrase. phrase' DB<133> split /(".*?"|\.)/ 0 'phrase' 1 '.' 2 ' ' 3 '"phrase1.phrase2"' 4 ' phrase' 5 '.' 6 ' phrase' DB<134>
|
|---|