2021年3月23日星期二

Use RegEx in InDesign

My goal is to have a dialog box open when a specific type of InDesign document is open. problem is that those InDesign docs will have different names.

for example:

abc_1234_proof.indd

zyx_5678_proof.indd

lmno_2342_proof.indd

within javascript, how do i use regex to look at the document file name and if it matches this format, show the dialog. if not, no dialog and the indesign doc opens like normal.

This is what im using to get the filename and split it at the file ext. im having trouble with the regex replace part

var fileNameTrim = app.activeDocument.name.split(".")  var anyFileName = fileNameTrim.replace( , );  alert(fileNameVariable[0].match())  alert(anyFileName)  
https://stackoverflow.com/questions/66773388/use-regex-in-indesign March 24, 2021 at 09:07AM

没有评论:

发表评论