Fixing These Files.

General discussions about Advanced Find and Replace
Post Reply
jeffrey1790
Posts: 10
Joined: Tue May 29, 2007 3:10 pm

Fixing These Files.

Post by jeffrey1790 »

i have several "md" files which look something like this:

http://jeffrey1790.com/1.md

i would like it to remove the last digit from the number underneath the difficulty.

e.g

Hard:
95:

turns into
Hard:
9:

Thanks

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: Fixing These Files.

Post by Abacre »

Go to main menu - Action - Options - Batch Replace
check "Modifier S"

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
(Hard:\r\n\s+\d+)\d(:\r\n)

Replace with:
$1$2

That's all I verified it works perfectly.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

jeffrey1790
Posts: 10
Joined: Tue May 29, 2007 3:10 pm

Re: Fixing These Files.

Post by jeffrey1790 »

Roman wrote:Go to main menu - Action - Options - Batch Replace
check "Modifier S"

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
(Hard:\r\n\s+\d+)\d(:\r\n)

Replace with:
$1$2

That's all I verified it works perfectly.
There is no "modifier s" box to check (maybe because i am using v.2).
And I would also like it to remove the last digit from the other difficulties.

eg:

dance-single:
Renard:
Hard:
95: <-- remove the 5

dance-single:
Renard:
Medium:
72: <-- remove the 2
0.442,0.533,0.111,0.018,0.148:

dance-single:
Renard:
Easy:
36: <-- remove the 6
0.313,0.328,0.046,0.009,0.000:

etc.

There are 5 difficulties which include: beginner, easy, medium, hard, challenge
including 2 modes dance-single and dance-double

Thanks

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: Fixing These Files.

Post by Abacre »

"Modifier S" is located in menu Action - Options - Batch Replace.

For other levels of difficulty: simply add corresponding r.e. into the batch grid,
for example, search for:
(Easy:\r\n\s+\d+)\d(:\r\n)

Sure we can create one r.e. to handle all levels of difficulties, but it's quicker to simply add all 5 levels into one batch grid (you will have 5 rows in the batch grid).
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

jeffrey1790
Posts: 10
Joined: Tue May 29, 2007 3:10 pm

Re: Fixing These Files.

Post by jeffrey1790 »

thanks.

Post Reply