Work on sed without -r support.