Wildcard or place holder for Positon

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Wildcard or place holder for Positon

Post by kpassaur » Tue Nov 18, 2008 4:03 pm

Is there any wildcard or place holder that can be used with the Position> command. I cannot find anything in the help or on the forum. The goal is to be able to use something similar to this

*.*.*.*

Which would find the start positon of of anything that has three periods in the line such as an ip address. I realize that in this case I could use the position command and send it three times to varify a line and then count the characters but this seems in flexible.

I say this as what if a user wants to change it they have to change all of the code as opposed to just changing a wildcard string.

If not a wildcard a place holder such as "?"

this??. would search for a string that has "this" two characters and then a period.

Is there any way to do this with out searching for "this" when the positon is found adding 6 characters and checking for a period.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Nov 18, 2008 4:56 pm

Probably doesn't help much but you could do something like use regex to find the actual text matching the pattern, and then use pos to locate it.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Nov 18, 2008 5:08 pm

Sounds like what you are asking for is indeed Regular Expressions.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Nov 18, 2008 7:51 pm

Macro Scheduler supports the VBScript RegExp Object.

See VBScript help for RegExp here: http://msdn.microsoft.com/en-us/library ... S.85).aspx
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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