這是我的方式,我想否定:了preg_replace,否定正則表達式
[\+\-][0-9\.]+
這些示例行:
Stephane Robert (+1.5 Sets)
Stephane Robert (-1.5 Sets)
Philipp Kohlschreiber
Philipp Kohlschreiber (-1.5 Sets)
Philipp Kohlschreiber (+1.5 Sets)
Player Names (n)
Another Player-Player
我想要去除所有,但數字匹配模式,即我只想要正數或負數浮點數。
+1.5
-1.5
-1.5
+1.5
我使用的是php和preg_replace。
謝謝!
爲什麼downvoted?想知道提高答案的理由 –