Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Regular Expressions Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 05 2005 at 09:52 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 05 2005 at 17:06 | IP Logged Quote TonyNo

I've tried some, and they don't seem to work. My bad!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 05 2005 at 17:08 | IP Logged Quote dhoward

Tony,

Im unfamiliar with the term. Can you post some samples for me?

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 05 2005 at 18:42 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 06 2005 at 20:57 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 06 2005 at 21:26 | IP Logged Quote TonyNo

Wow, that looks darn close! Too bad it doesn't return the position in the string.

Edited by TonyNo
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 07 2005 at 22:12 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 07 2005 at 23:00 | IP Logged Quote TonyNo

This is supported in vb script, so no biggie.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum