If you use any flavor of Unix other than GNU, you can either install GNU sed yourself, or simply switch to awk or ruby or perl .
For instance:
ruby -e 'ARGF.each{|l|puts l.gsub(/0+/, "L")}' regex.txt
Using awk:
awk '{gsub("0+", "L"); print $0}' regex.txt
Extended regular expressions are available on Mac OS / X through -E rather than -E .
In the BSD General Command Guide:
-E Interpret regular expressions as extended (modern) regular expressions rather than basic regular expressions (BRE's). The re_format(7) manual page fully describes both formats.
source share