Skip to main content
3 of 4
added 7 characters in body
Jörg Hülsermann
  • 13.3k
  • 3
  • 15
  • 36

PHP, 84 Bytes

<?=preg_replace(["#[a-z]#i","#(?<!l)l#","#(?<=l)l#","#e(?!e)#"],[l,B,e,t],$argv[1]);

PHP ,117 Bytes

<?=preg_replace_callback("#[a-z]+#i",function($m){return substr(str_pad(Bl,-1+$l=strlen($m[0]),e).t,0,$l);},$argv[1]);
Jörg Hülsermann
  • 13.3k
  • 3
  • 15
  • 36