bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22943: sed: + intepreted twice


From: Dam, Jesse van
Subject: bug#22943: sed: + intepreted twice
Date: Tue, 8 Mar 2016 12:06:43 +0000

Hi,


The plus sign in the following sed command is interpreted twice. One time for 
'1 or more occurrences' and one time as match a plus sign. I think this is 
incorrect behavior. Correct me if I am wrong.


echo '+710+1869' | sed 's/\(.[0-9]+\).*/\1/g'

Results in

+710+

Expected result

+710


Version: sed (GNU sed) 4.2.2


Thanks,

Jesse van dam








reply via email to

[Prev in Thread] Current Thread [Next in Thread]