You'll probably have to use SUBSTR and POSSTR or something like that, since there is no generic concept of "string is like an other string".
E.g., if you want to check whether the first and third bytes are identical (but possibly not the second one):
If the start point of the match is not fixed but depends on the contents (say: identical after the first "."), combine substr() with posstr():
WHERE substr(col1,1,1)=substr(col2,1,1) AND substr(col1,3,1)=substr(col2,3,1)
WHERE substr(col1,posstr(col1,'.')) = substr(col2,posstr(col2,'.'))
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting