Sometimes you wish to create a regular expression comprising of two or more character classes. This is possible using nesting approach.

Java Code:
Pattern pattern = Pattern.compile("H[a-e[x-z]]llo");