Case Insensitve Searching with Position

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mark@HOB
Newbie
Posts: 6
Joined: Fri Jun 27, 2003 10:10 am
Location: Malta (Head Office in Germany)
Contact:

Case Insensitve Searching with Position

Post by Mark@HOB » Fri Jan 23, 2004 9:33 am

Hi all,

I am trying to parse an HTML page for links using the position command but there is a problem with case-sensitivity. Is there a way I could make Position case insensitive?

Regards,

Mark

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Jan 23, 2004 12:03 pm

Hi,

Use the VBScript UCASE function to convert both items to upper case and then compare.

//The following two lines enables VBScript in your code
VBSTART
VBEND

Let>var=Hello World
//The following line converts the value in the var variable to uppercase.
VBEval>ucase("%var%"),var

Now you can use Position against var to do a case insensitive comparison - just put the value you are searching for in upper case.
MJT Net Support
[email protected]

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Case sensitive Position command

Post by tony_smith » Mon Feb 09, 2004 5:09 pm

I ran into this issues before... My post Jan09/2004, because the case-sentisitivy is not documented in help command reference, it took some doing to find out.

Besides document this in the help, I would like to see an enhancement to change the command to include a case switch. Is this possible?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts