PraveenKumarGautam
asked on
Regular Expression (Find and Replace)
Hi,
In one of my file I have the data as below
04001-AP107-6718,2005,"5,9 39",0,0,"5 ,939","6,1 17","2,630 ",10.52,
here I would like to replace "5,939" with "5939".
Please suggest a way out.
In one of my file I have the data as below
04001-AP107-6718,2005,"5,9
here I would like to replace "5,939" with "5939".
Please suggest a way out.
ASKER
I need a regular expression that can work in Notepad++ for this data
ASKER
I just want to do the similar find and replace(as mentioned in the question) in the whole file
Notepad really works in this way withou problems - you put the Find box "5,939" in the replace box: "5939" and replace all will work
Do you mean you want to follow the general pattern als replacing "6,110" with "6110", etc - ?
Do you mean you want to follow the general pattern als replacing "6,110" with "6110", etc - ?
ASKER
Yes I am looking for a general pattern
Try
String PAT = "(\"\\d+),(\\d+\")";
line = line.replaceAll(PAT, "$1$2");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried the same in Notepad++ but it is replacing the numbers with $1$2 rather then the desired results
It would be more like what i posted here http:#35218809
:)
Open in new window