Casting by type target property with regex function

Cast by target property's type.
Fix regex function usage with Number's type.

Issue #3