AE 14 regular expression question

tommrz

Well-known member
I am using a simple select file ticket linked to a copy ticket in AE14.1 to copy a file to external server once a workflow is started. To be exact, I have a worflow set up to rasterize separations (rip), when I initiate the workflow AE scans the job URL for any pdf file containing the characters PRF. These files are our proof files and they are copied to a server that the pressroom uses for QC. So, sometimes our proof files will be revisions so the file would be named 1234-customer PRF R1.pdf. I set up the select file ticket to grab any pdf that contains PRF characters regardless of what rev it is. This works perfectly, the problem I am having is that in some cases a low-res version of that pdf sits in the same folder and it copies that also because it contains the PRF characters . We use QC software that compares the pdf proof to a sheet that is scanned from the press. Low-res pdfs could cause problems with that so I want to be able to tell AE to select all pdf files with "PRF" in them EXCEPT any that have "-lr" in them. We use a -lr to designate low-res. I am totally new to AE and it seems I should be able to use a regular expression to do this I just dont know how to. Any body have any ideas?
Currently my ticket is set up as:
Name Matches:*PRF*.pdf

I want to do something like this from the AE manual but want to select all files with PRF except ones that have -lr:

•To select all files except files where the name contains _report :
(?!.*_report).*@regex
 
Learning GREP/RegEx is on my bucket list…

So, there are two file names, such as:

1234-customer PRF R1.pdf
1234-customer PRF R1-lr.pdf

Does the following regex fly?

Code:
(?!.*-lr).*

or

Code:
(?!.*-lr).*@regex

presuming that the @regex is an Esko requirement?


Stephen Marsh
 
Stephen, I think you are on to something but...
A typical job folder will look like:
1234-Customer(Containing Folder)
1234-customer PRF.ai
1234-customer PRF.pdf
1234-customer PRF-lr.prf
1234-customer PLT.ai
1234-customer PLTD.pdf

The regex you wrote above does indeed exclude the "-lr" file but it copies all other files to the external server instead of just the file containing "PRF" characters. Is there a way to capture on the PRF characters and also exclude the -lr file? QC only needs the proof pdf which we call PRF. I used the second regex because it appears esko does require the @regex. Could you suggest a place to start learning how to write regex. I know thats a topic all on its own and I am interested in regex as far as it pertains to Automation Engine.
 
OK, i think i have it now. After trying many different things this is what i came up with.
.*PRF*.pdf(?!.*-lr).*@regex
 
Hey, glad you got there tommrz! Without having AE, it is very hard to advise on regular expressions as I don’t know what “flavour” it uses. I am guessing that it may use the same language as PitStop (Perl), but that is just a guess:

PitStop supports Boost Regular Expressions. For more information, refer to http://www.boost.org/doc/libs/1_47_0/libs/regex/doc/html/boost_regex/synt ax/perl_syntax.html.

I do have links to many websites where you can start learning grep/regex. I originally wanted to learn for InDesign, however it is applicable to workflow as being discussed here. One can also get books. I have recently subscribed to Lynda.com for a year in order to try to learn from video tutorials – now all I need is time and a clear head!


Stephen Marsh
 
Last edited:
Thanks again Stephen! I sent you a PM...I think! Time and a clear head both in the same sentence !?!? I wonder if there's a regex for that.
 
Thanks again Stephen! I sent you a PM...I think! Time and a clear head both in the same sentence !?!? I wonder if there's a regex for that.

Problem is, learning the regex for that would take my time and fill my head… The dilemma!

Attached are the various links that I have collected on grep/regex.


Stephen Marsh
 

Attachments

  • GREP REGEX Links.html.zip
    3.8 KB · Views: 233
Last edited:

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top