In addition, '_' is the SQL equivalent of '.' in Perl regexes. So, 'DDD______%' is equivalent to 'DDD.{6}.*' in Perl. (Note that the two-character token ".*" is equivalent to '%' in SQL, not the one-character token '*'.)
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?