We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
'Sed' command #5
'Sed' command #5
Sort by
recency
|
90 Discussions
|
Please Login in order to post a comment
As simple as that.
sed -E 's/(\d{4}) (\d{4}) (\d{4}) (\d{4})/\4 \3 \2 \1/g'
pretty hardcoded but still works
Test case 3 does NOT confirm to the problem specification:
This works
-E saves me :)
sed -E 's/([0-9]{4} )([0-9]{4} )([0-9]{4} )([0-9]{4})/\4 \3\2\1/g'