Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 05 2005 at 09:52 | IP Logged
|
|
|
I've seen similar codes used in macros, which prompts the question: Does PH support the use of regular expressions (regex) in macros?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 05 2005 at 17:06 | IP Logged
|
|
|
I've tried some, and they don't seem to work. My bad!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 05 2005 at 17:08 | IP Logged
|
|
|
Tony,
Im unfamiliar with the term. Can you post some samples for me?
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 05 2005 at 18:42 | IP Logged
|
|
|
I was too, until recently! VB Script supports it, so adding it to the macro language is not essential.
A regular expression (regex or regexp for short) is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids.
Here is a good reference.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 06 2005 at 20:57 | IP Logged
|
|
|
Tony,
I checked out your reference for regex. Pretty neat. The closest that PowerHome has is the "match" function. Im not at my regular PC so I don't have access to the help file to see how well it is documented. From memory though, it seems to be pretty close to regex.
Let me know your thoughts,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 06 2005 at 21:26 | IP Logged
|
|
|
Wow, that looks darn close! Too bad it doesn't return the position in the string.
Edited by TonyNo
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: September 07 2005 at 22:12 | IP Logged
|
|
|
Yeah, I figured that would probably be the weak point. I guess the regex's return the position?
I read through the regex quickstart and it looks like the match function is pretty close all the way down to the metacharacters. But just returning true or false wouldnt be as powerful as position.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: September 07 2005 at 23:00 | IP Logged
|
|
|
This is supported in vb script, so no biggie.
|
Back to Top |
|
|