Feh. Regular expressions
can be ugly, so comments certainly help. One thing in their favor is if the shell script gets turned into a Perl, Ruby, or Python program, or recoded in
Java, the regexp can go along for a ride; the other techniques would require a total rewrite.