Sort by

recency

|

90 Discussions

|

  • + 0 comments

    As simple as that.

    sed -E 's/(\d{4}) (\d{4}) (\d{4}) (\d{4})/\4 \3 \2 \1/g'

  • + 0 comments

    pretty hardcoded but still works

    sed -E 's/([0-9]{4})\s([0-9]{4})\s([0-9]{4})\s([0-9]{4})/\4 \3 \2 \1/g'
    
  • + 0 comments

    Test case 3 does NOT confirm to the problem specification:

    3
    6692 0561 4520 3826
    6425 7911 2003 7865
    4033 3854 0338 5166
    
  • + 1 comment

    This works

    • sed -E "s/(\d+) (\d+) (\d+) (\d+)/\4 \3 \2 \1/"
  • + 1 comment

    -E saves me :)

    sed -E 's/([0-9]{4} )([0-9]{4} )([0-9]{4} )([0-9]{4})/\4 \3\2\1/g'