Answered
regular expression not to start with hypen
I need a adobe acrobat javascript for text not be start with hyphen.
I need a adobe acrobat javascript for text not be start with hyphen.
So this is a custom Keystroke script? If so, try this:
var RE_Alpha = /^[A-Za-z_ -]*$/;
var RE_Hyphen = /^-/;
event.rc = RE_Alpha.test(event.change) && !RE_Hyphen.test(AFMergeChange(event));
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.