in reply to Regex - Matching prefixes of a word

You can easily check if a word starts with another using index "backwards":

index("hello", $word) == 0

I don't know if it would be simpler to use this approach or not.