I have 1000 line in file txt:
1/Such as :
Apr 2008
Aug 2007
Aug 2008
Aug 2010
Dec 2008
Dec 2009
Feb 2008
Result :
04 2008
08 2007
08 2008
08 2010
12 2008
12 2009
02 2008
Code :
Search----Replace
Jan---01
Feb---02
.......
Nov---11
Dec---12
Code is very row,i want it only 1 row.
2/Such as :
Apr 2008---Good---Eat
Aug 2007---Great---Drink
Aug 2008---Happy---Play
Aug 2010---Hope---Kiss
Dec 2008---Car---like
Dec 2009---Moto---hihi
Feb 2008---Bus---Cheap
Result :
G---04 2008---Good---Eat
G---08 2007---Great---Drink
H---08 2008---Happy---Play
H---08 2010---Hope---Kiss
C---12 2008---Car---like
M---12 2009---Moto---hihi
B---02 2008---Bus---Cheap
Plzz help me.Thankz
Sort code Replace !
Re: Sort code Replace !
You have to solve the problem in two steps.
2st step:
Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
(\w+ \d+---)(\w)
Replace with:
$2---$1$2
The result will be:
G---Apr 2008---Good---Eat
G---Aug 2007---Great---Drink
H---Aug 2008---Happy---Play
H---Aug 2010---Hope---Kiss
C---Dec 2008---Car---like
M---Dec 2009---Moto---hihi
B---Feb 2008---Bus---Cheap
2nd step:
Replace all months by numbers. You may uncheck "Use regular
expressions" and check "Whole Words Only".
Then you simply create a batch grid like this:
Search For:
Jan
Replace With:
01
Search For:
Feb
Replace With:
02
and so on for all 12 months.
2st step:
Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
(\w+ \d+---)(\w)
Replace with:
$2---$1$2
The result will be:
G---Apr 2008---Good---Eat
G---Aug 2007---Great---Drink
H---Aug 2008---Happy---Play
H---Aug 2010---Hope---Kiss
C---Dec 2008---Car---like
M---Dec 2009---Moto---hihi
B---Feb 2008---Bus---Cheap
2nd step:
Replace all months by numbers. You may uncheck "Use regular
expressions" and check "Whole Words Only".
Then you simply create a batch grid like this:
Search For:
Jan
Replace With:
01
Search For:
Feb
Replace With:
02
and so on for all 12 months.
-
- Posts: 13
- Joined: Mon Aug 20, 2007 9:25 am
Re: Sort code Replace !
Thanks.
But it is complex.
Have way other ?
If ex2 is :
2/Such as : find first of : xxxx
Apr 2008---like---1ood---Eat
Aug 2007---like---1rea---Drink
Aug 2008---Eat---3app---Play
Aug 2010---mary---4ope---Kiss
Dec 2008---like---2452---like
Dec 2009---like---3456---hihi
Feb 2008---like---2usy---Cheap
Result :
1---Apr 2008---like---1ood---Eat
1---Aug 2007---like---1rea---Drink
3---Aug 2008---Eat---3app---Play
4---Aug 2010---mary---4ope---Kiss
2---Dec 2008---like---2452---like
3---Dec 2009---like---3456---hihi
2---Feb 2008---like---2usy---Cheap
But it is complex.
Have way other ?
If ex2 is :
2/Such as : find first of : xxxx
Apr 2008---like---1ood---Eat
Aug 2007---like---1rea---Drink
Aug 2008---Eat---3app---Play
Aug 2010---mary---4ope---Kiss
Dec 2008---like---2452---like
Dec 2009---like---3456---hihi
Feb 2008---like---2usy---Cheap
Result :
1---Apr 2008---like---1ood---Eat
1---Aug 2007---like---1rea---Drink
3---Aug 2008---Eat---3app---Play
4---Aug 2010---mary---4ope---Kiss
2---Dec 2008---like---2452---like
3---Dec 2009---like---3456---hihi
2---Feb 2008---like---2usy---Cheap
Re: Sort code Replace !
I think this is almost the same case as previous. You can do it yourself.
-
- Posts: 13
- Joined: Mon Aug 20, 2007 9:25 am
Re: Sort code Replace !
Plzz help me ex a like me config.Roman wrote:I think this is almost the same case as previous. You can do it yourself.
I develop it rest require of me.
So i write question & wait u rely.
Many thanks for support from Roman.
Plzz help me it :
2/Such as : find first of : xxxx
Apr 2008---like---1ood---Eat
Aug 2007---like---1rea---Drink
Aug 2008---Eat---3app---Play
Aug 2010---mary---4ope---Kiss
Dec 2008---like---2452---like
Dec 2009---like---3456---hihi
Feb 2008---like---2usy---Cheap
Result :
1---Apr 2008---like---1ood---Eat
1---Aug 2007---like---1rea---Drink
3---Aug 2008---Eat---3app---Play
4---Aug 2010---mary---4ope---Kiss
2---Dec 2008---like---2452---like
3---Dec 2009---like---3456---hihi
2---Feb 2008---like---2usy---Cheap
Re: Sort code Replace !
The solution is:
Search for:
(\w+ \d+---\w+---)(\w)
Replace with:
$2---$1$2
Search for:
(\w+ \d+---\w+---)(\w)
Replace with:
$2---$1$2
-
- Posts: 13
- Joined: Mon Aug 20, 2007 9:25 am
Re: Sort code Replace !
Thanks Roman vey much.
Best wishes !
Best wishes !