I'm trying to replace the first "|" but by starting by the end of the string:
usr/bin/pipe|pipe|name|28|-rwxr-xr-x|root:root||46711b361edd4512814d9b367ae765f42a71d729708b3f2e162acb8f64592610|
my file name is pipe|pipe|name
and i want my regex to return me usr/bin/pipe|pipe|name
I've begin by this regex: .([^\|]*)$
but I don't know how to go further in the pipes : https://regex101.com/r/ttbiab/3
And in Java:
String strLine = "usr/bin/pipe|pipe|name|28|-rwxr-xr-x|root:root||46711b361edd4512814d9b367ae765f42a71d729708b3f2e162acb8f64592610|";
strLine = strLine.replaceAll(".([^\\|]*)$", "[:124:]");
System.out.println("strLine : " + strLine);