in reply to matching a regular expression

Hi monks, I need to match a user input, like for example if a user needs to enter "hsbn" , he can enter "h" or "hs" or "hsbn" or any portion of the string hsbn.

I suppose any portion starting from the beginning, right? If so, then how 'bout

print "ok\n" if 0 == index 'hsbn', $userinput; # ?