标签: php regex
我想用br替换所有的点,除了数字之间和快捷词之后的点。
例如:
this is my number 1.4 hi dr. david, my name is ayman. how are you. thanks you
转换为
this is my number 1.4 hi dr. david, my name is ayman <br /> how are you <br /> thanks
答案 0 :(得分:0)
您可以使用负lookbehind/lookahead表达式进行播放。例如
(?<!dr|mr|mrs|miss)\.(?!\d)