Replace 使用Notepadd+;将数字替换为特定格式+;

Replace 使用Notepadd+;将数字替换为特定格式+;,replace,numbers,find,notepad++,Replace,Numbers,Find,Notepad++,我试图用记事本将一些数字替换为其他格式的符号++ 比如说 -4399.10 changed to 439910} 4399.10 changed to 439919{ -2303.29 changed to 230329} 2303.29 changed to 230329{ all negative signs will be changed to } symbol from right all positive will be replaced with { 谢谢在记事本中使用条件

我试图用记事本将一些数字替换为其他格式的符号++

比如说

-4399.10 changed to 439910}
4399.10  changed to 439919{
-2303.29 changed to 230329}
2303.29  changed to 230329{

all negative signs will be changed to } symbol from right
all positive will be replaced with { 

谢谢

在记事本中使用条件替换++

查找内容:
(?-)(\d+(\.\d+))

替换为
\2?{negative}}:{

\2?{negative}}:{
\2                 the captured number without sign in group 2
  ?{negative}      if group negative (negative sign) is matched
             }       character }
              :    else
               {     character {
命名组是可选的,即
\2?{1}:{
或甚至
\2?1}:{
的工作原理相同。

请记住在“查找内容”中修改正则表达式以完全匹配您的格式。

您是否尝试过
ctrl+h
?ctrl-h将需要大量查找和替换。-符号将被替换}您很接近,但这保留了负号。哎呀,没有注意到这一点,但这应该是一个简单的修复方法。附言:别担心,我给你+1。