I have a text file as follows:
/XXX/10000/XXX-15/10000 /XXX/10000/XXX-15/10000
/XXX/10000/XXX-17/10001 /XXX/10000/XXX-17/10001
/XXX/10000/XXX-18/10002 /XXX/10000/XXX-18/10002
/XXX/10000/XXX-272/10004 /XXX/10000/XXX-272/10004
/XXX/10000/XXX-322/10008 /XXX/10000/XXX-322/10008
I have task to get rid from files after the XXX-? folder so the output will be look like
/XXX/10000/XXX-15 /XXX/10000/XXX-15
/XXX/10000/XXX-17 /XXX/10000/XXX-17
/XXX/10000/XXX-18 /XXX/10000/XXX-18
/XXX/10000/XXX-272 /XXX/10000/XXX-272
/XXX/10000/XXX-322 /XXX/10000/XXX-322
I try to find using the regex [^A-Z]/[^A-Z][0-9]*, but it returns the first digit before the /
, like 5/10000, 7/10001, 8/10002 and so on, but I need to find and remove only /10000.
What am I doing wrong?