Reputation: 137
I have string like below (one long line with a space in the middle):
100">16946083;Rapid_0201_Corrected_Pre_Sept12thDate.txt;5744-2;RapidReporting;RR_20160606115224556.fin.bc_lerr.xml "100">16946083;Rapid_0201_Corrected_Pre_Sept12thDate.txt;5744;RapidReporting;RR_20160606115224556.fin.bc_lerr.xml
I want to remove the varying length set of digits between >
and ;
which, in this example, means remove (the first occurrence of) 16946083
.
This text is an output of my sed
and cut
commands.
Upvotes: 0
Views: 1304
Reputation: 14500
How about
sed -e 's/>[0-9]\+;/>;/'
which will find the first >
any number of digits and the ;
and replace that whole string with just >;
Upvotes: 1