Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Regular Expression not working
Topic Summary:
Created On: 08/30/2017 02:11 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 08/30/2017 02:11 AM
User is offline View Users Profile Print this message

Author Icon
MarkPerry
Student (5-19 posts)

Posts: 9
Joined: 06/22/2017

I am trying to use a regular(actually a lot of regular exoressions) to check file names as the files come in. But currently it is not working it sees all files as failing or lets everything through
 
If I put a correctly named asset in the folder it tries to reject it.

I need to parse ther file names by a lot of expressions but again this doesn't work at the moment.

For instance if I create a variable with the following list

^[fF][pP]\d{7}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[fF][fF]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[fF][lL]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[fF][mM]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[nN][gG][rR][pP]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[nN][gG][wW][rR]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[nN][gG][wW][pP]\d{6}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[fF]{1}\d{7}\.[wW][aA][vV]$|^[a-zA-Z]{2}-[fF][nN]\d{7}_[a-zA-Z]{3}\.[wW][aA][vV]$|^[aA][dD]\d{7}_[a-zA-Z]{3}\.[wW][aA][vV]$

It just passes everything through.  

I know these expressions work outside of Automate but not inside, what am I missing?

Thanks

 Category Survey
AutoMate BPA Server 10 version: 10.4.2
Windows version: Windows Server 2012 R2



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Edited: 08/30/2017 at 06:40 AM by AutoMate Discussion Moderator
 08/30/2017 02:50 AM
User is offline View Users Profile Print this message

Author Icon
MarkPerry
Student (5-19 posts)

Posts: 9
Joined: 06/22/2017

UPDATE

 

I've managed to get one expression to work, however I can't get the below to work

 

^[fF][fF]\d{6}_[a-zA-Z]{3}$

Specifically this should allow FF132456_AAA

To pass through, at the moment it does not.

 



 Category Survey
AutoMate BPA Server 10 version: 10.4.2
Windows version: Windows Server 2012 R2
 08/30/2017 06:45 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Mark,

I'm not sure what you are trying to accomplish here. The variable list that you have provided is a list of regular expressions. If that is the list you are parsing against, then that list will look as is and not evaluate. The regular expression option in the step is for the "text to look for" section only. We need a more complete picture of the issue. Please provide a sample task using the Attach Code button that demonstrates the issue you are experiencing.



 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 826 guests browsing this forum, which makes a total of 826 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog