Maybe I've been trying to hard and am at the frustration point where I am missing something obvious. I'm even using an example from another post that I myself wrote and it's not working!
VC 8.2.9
With a loop I am getting the files in a folder. For each one I am extracting the date from the filename and storing it in a job variable. I need to add a pipe and the job variable contents to the end of every line in the file. Should be simple! So I use a read task to read the contents of the file then a write task to a new file.
Here's the "value" section from the write file task. in regex logic, I want to replace the end of the line with the contents of the job variable. "Error in argument".
{TASK(PrevTask,StdOut)} by itself works ok.
{REGEX(Replace,{TASK(PrevTask,StdOut)},\r\n,|{JOB(Active,Variable,JobFileDate)})}
Save me from going crazy!!! is there a visualcron-specific regex character for the EOL that I should be using? It's usually a dollar sign but that does not work here for matching the end of the line.
By the way, I must say "Error in argument" is not enough info for an error message. At least report what argument and what the error is please!
EDIT 2/12/2019 for future searchers. I learned recently when you need to use the pipe symbol in your regex, and you thus need to use a different character as the separator in the REGEX command (as the pipe is the normal separator in visualcron functions), the character you choose needs to be the first character in the REGEX call. Here I used a comma, so if I were to have constructed the call like the following, all would have been good! Note the comma as the first character in front of the REPLACE.
{REGEX(,Replace,{TASK(PrevTask,StdOut)},\r\n,|{JOB(Active,Variable,JobFileDate)})}
Edited by user
2019-02-12T15:33:01Z
|
Reason: Not specified