Jump to content
Sign in to follow this  
Mattraks

Delete

Recommended Posts

Mattraks

Delete

Edited by Mattraks

Share this post


Link to post
Share on other sites
martin

Is there such thing as something that can compare strings but with like say a * as a wildcard? Like "abc" would compare with "ab*" and "a*bc" would compare but like "abd" or "ad*" wouldn't. So can you tell me if something does that? Thanks.

Look up StringRegExp in the help.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
martin

Can you just tell me how to check if "*!*@text" matches "Mattraks!~ident@text"? I don't understand how StringRegExp works too well

StringRegExp("Mattraks!~ident@text",".{1,}!.{1,}@text",1)
;means try matching with
;1 or more character ".{1,}"
;followed by "!"
;follwed by 1 or more characters ".{1,}"
;followed by "@text"
switch @error;@error set by StringRegExp tells you what happened
    case 0
        ConsoleWrite("matches" & @CRLF)
    case 1
        ConsoleWrite("no match" & @CRLF)
    case 2
        ConsoleWrite("Invalid pattern" & @CRLF)
EndSwitch

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×