Q:

Extract words from string in java by its beginning and its length

I want to extract a part of a text from a string knowing the beginning of the word and its length.
For example, I have the following string: 
"snfsdb bvyvujmnhellonmnfu"

My rule is: 
The word start by "hel" and has a length of 5.

It should return 
"hello"

What would be the best way to achieve that?

A:

/hel\w{2}/ should do the trick. That matches the literal "hel" followed by any 2 word characters, which are defined as the character class [a-zA-Z_0-9]

