Page 1 of 1

Remove leading digits on each line using JREPL?

Posted: 31 Aug 2023 16:44
by Srjcs
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

Re: Remove leading digits on each line using JREPL?

Posted: 01 Sep 2023 01:19
by Outbreaker
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"