[Solved] The regular expression error is malformed


I guess, it means that you must escape the character '-' by writing '\-' within the regular expression, when it’s not used as a range indicator.

Try to change:

'.+@^[A-Za-z0-9.-]+\.^[A-Za-z]{2,4}'

by

'.+@^[A-Za-z0-9.\-]+\.^[A-Za-z]{2,4}'

As @Fallenhero stated. The '^' seem also to be misplaced somehow.

1

solved The regular expression error is malformed