これは私が否定したい私のパターンです:
[\+\-][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を使用しています。
ありがとう!