in reply to confused with strings
$_ = 'XX**XXX!!!X**AB*!C*DXX*!!!XXX**XXX'; /A[!\*]*B[!\*]*C[!\*]*D/g and print '#', pos() + 1 - length($&), '-#', + pos(); __OUTPUT__ #14-#20 [download]