2014-07-25 3 views
0

내가 형태의 메모장 ++에서 몇 가지 간단한 판매량이 내용교체 괄호 ("-") + 메모장에서 괄호 ++

($12 000) 
($9 000) 

등 등

내가 변경하려면

이 양식에서

-120000 
-90000 

나는이 정규식 가능합니다 확실 해요/찾기 -에 어떻게 든 대체하십시오. 메모장에서 이것을 달성하는 가장 좋은 방법은 무엇입니까?

Find : (\d) 
Replace : -\d 

아무데도 들리지 않습니다.

도움을 주시면 감사하겠습니다.

+0

이 답변 중 하나를 고려 하나를 받아들이는이 질문을 폐쇄하십시오 일 경우 :

RegexBuddy는 정규식에 대한 다음 설명을 생성합니다. – hwnd

답변

1

사용이 정규 표현식 : 교체로

\((\$\d+\s\d+)\) 

사용이 :

-\1 

정규 표현식 라디오 버튼이 선택되어 있는지 확인합니다.

설명

\((\$\d+\s\d+)\) 

Match the character "(" literally «\(» 
Match the regular expression below and capture its match into backreference number 1 «(\$\d+\s\d+)» 
    Match the character "$" literally «\$» 
    Match a single digit 0..9 «\d+» 
     Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» 
    Match a single character that is a "whitespace character" (spaces, tabs, line breaks, etc.) «\s» 
    Match a single digit 0..9 «\d+» 
     Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» 
Match the character ")" literally «\)»