philw Posted June 10, 2008 Share Posted June 10, 2008 (edited) I need to set up a regular expression to check a series of strings.The following:1:h22-9:div10-should all evaluate to true. I tried using:If StringRegExp($teststring, "\A[:digit:]{1,}\-{0,}[:digit:]{0,}\:[:alnum:]{1,}\Z") Then - string is ok -Else - string is not ok -EndIfbut it doesn't seem to work. Any help gratefully received! Edited June 10, 2008 by philw Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 10, 2008 Share Posted June 10, 2008 Hi, okay, so what a the rules? Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
philw Posted June 10, 2008 Author Share Posted June 10, 2008 Hi,okay, so what a the rules?MegaStart of stringA number (1 or more characters)Possibly followed by a single hyphenPossibly followed by another number (1 or more characters)Must be followed by a single colonMust be followed by one or more alphanumeric charactersEnd of stringAnd with no spaces anywhere. Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 10, 2008 Share Posted June 10, 2008 \d+[-\d]*:\w+ Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
philw Posted June 10, 2008 Author Share Posted June 10, 2008 \d+[-\d]*:\w+ Just a little different to my attempt. Thanks very much for that! Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 10, 2008 Share Posted June 10, 2008 No prob. Hopefully it does what you need. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now