ENYO-3181: Generalize text directionality check as a utility function, use regular expressions instead of range checks.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>