Answered
Check the specific name of the prefix in the name of the active document.
Hello everyone! How to check if the name of the active document is prefixed with "[OK!]"?
Example: [OK!] MyDocument_01.
Grateful for the help!
Hello everyone! How to check if the name of the active document is prefixed with "[OK!]"?
Example: [OK!] MyDocument_01.
Grateful for the help!
You need to escape [] and also remove the unwanted spaces in the regex. Try the following
if (activeDocument.name.match (/^\[OK!\]/)){alert ("true")}
-Manan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.