Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


lal
  •  lal
  • No customer Topic Starter
2009-05-23T04:37:32Z
I am attempting to match a regular expression in a file. When I check it with a regex validator, it appears that the regex is correct. When I use it in the VC function, along with a sample string, the output shows the regex match variable syntax at the beginning and end.

This is how I'm using it:
{REGEX(Match|{TASK(4c4ff35d-8c8a-4ad9-8954-f997ed58407d|StdOut)}|\[404\].+//.+(/.+)\])}

A pattern match would look something like this:
[404] for URL [http://host/path/path/en-path/path/file.file_file.1.en-file.ext]

I've also tried using a sample string directly from the file in the value preview pane, and using the file content variable, which would be the preferable way to get the file content, with the same results.

The beginning and the end of the output looks like this, with a small bit of the file content in between:

{REGEX(Match|[2009/05/21 23:59:55.545] 11A4 <<< DebugLog Start(98 bytes sent, 5410|\[404\].+//.+(/.+)\])}
Sponsor
Forum information
lal
  •  lal
  • No customer Topic Starter
2009-05-23T05:04:45Z
An additional question, also related to this regex.

The job in question used the same regex in a file copy task for the same job; originally that was the only use of the regex. The job did not perform as expected - it copied files during time periods when no match should have been found.

1) If the regex match function doesn't work properly with a given regex, then the same regex probably wasn't working properly in the file copy either, is that correct?

2) Would it be possible to have debugging information for regex's logged, so that if there is a problem with a regex, that information about it is logged for troubleshooting? When the job only had a file copy task using a regex, I couldn't tell why it wasn't working as expected. I found out about the problem with the regex when I needed to add some additional steps to the job that used the same regex in the regex match function; then the problem became apparent.
Support
2009-05-24T14:26:33Z
1. The RegEx should work anywhere
2. We'll see what we can add

The problem, in this case is the paranthesis which are currently used for defining parameters in Variables. That is why paranthesis cannot currently be used in a RegEx match.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-05-10T12:06:41Z
Please test parenthesis with this version:

http://www.visualcron.co....aspx?g=posts&t=1218 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top