Remove leading digits on each line using JREPL?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Srjcs
Posts: 1
Joined: 31 Aug 2023 16:24

Remove leading digits on each line using JREPL?

#1 Post by Srjcs » 31 Aug 2023 16:44

Hello,
I have a text file that contains a list of names, following a year.
I was wondering if it was possible to use JREPL to remove the leading digits, and keep the name at the start of each line?

Code: Select all

Text File:

Jerry 2023
Savannah 2019
Tim 2022.5

Code: Select all

Desired output:

Jerry
Savannah
Tim

Outbreaker
Posts: 10
Joined: 08 Aug 2023 15:16

Re: Remove leading digits on each line using JREPL?

#2 Post by Outbreaker » 01 Sep 2023 01:19

That's the RegEx code I would use with JREPL:

Code: Select all

CALL ".\JREPL.bat" " [0-9].*[0-9]$" "" /XSEQ /F "test.txt" /O "test1.txt"

Post Reply