Network Automation Software
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: Help with Regex and why it is not finding text
Topic Summary:
Created On: 07/27/2016 09:27 AM
Status: Post and Reply
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.
 07/27/2016 09:27 AM
User is offline View Users Profile Print this message

Author Icon
NickKitchen
Student (5-19 posts)

Posts: 6
Joined: 07/18/2016

I am having some problems with regex and copying it into a variable  What I have is this (snippet of the source code)

<SELECT NAME="p_completion_date" SIZE="1">

<OPTION value="0000">Year

<OPTION SELECTED value="2016">2016

<OPTION value="2015">2015

<OPTION value="2014">2014

<OPTION value="2013">2013

<OPTION value="2012">2012

</SELECT>

</TD>

</TR>

</TABLE>

When entering the license number, do not include any letters or zeros at the beginning of the license number.  Ex. License number S-087458 would be entered as 87458.

<TABLE >

<TR>

<TD class="requiredfieldnameleft">License Type</TD>

<TD class="requiredfieldnameleft">License Number</TD>

</TR>

<TR>

<TD COLSPAN="4" class="error">**This person has completed this course within the past year and will not be entered into this person's record.**</TD>

</TR>

<TR>

<TD>

<SELECT NAME="p_authorization_group">

<OPTION VALUE="APPR">Appraiser

<OPTION SELECTED VALUE="REBK">Real Estate

</SELECT>

</TD>

<TD><INPUT TYPE="text" NAME="p_authorization_number" SIZE="30" MAXLENGTH="30" VALUE="147889"></TD>

<TD>

<span class="fieldname">Remove record?

<SELECT NAME="p_remove">

<OPTION VALUE="Y">Y

<OPTION SELECTED VALUE="N">N

</SELECT>

 

And here is the Automate code I used:

<AMTEXT TEXT="%courseSource2%" FIND="(?im)class="error">(.*)<" RESULTVARIABLE="currErrorIndex" USERE="YES" FOUNDTEXTVARIABLE="currError" />

The regex is supposed to be just

"error">(.*)<

which would I have tested online with other regex testers and returns 

**This person has completed this course within the past year and will not be entered into this person's record.**

Why isn't this populating in Automate?

Thank you for all your help.



 Category Survey
AutoMate 7 version:
Windows version:
 07/27/2016 09:38 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 273
Joined: 03/17/2016

Hi Nick,

What's the exact version of AutoMate you are using?



 Category Survey
AutoMate 7 version:
Windows version:


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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 07/29/2016 01:47 PM
User is offline View Users Profile Print this message

Author Icon
NickKitchen
Student (5-19 posts)

Posts: 6
Joined: 07/18/2016

This was a duplicate of another forum entry.  I didn't think this had posted and created the other.  This can be deleted.



 Category Survey
AutoMate 7 version:
Windows version:
Statistics
17495 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.

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

Sitemap Network Automation Software Blog