String ignoring some character

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
euras
Posts: 429
Joined: 05 Nov 2015, 12:56

String ignoring some character

08 May 2019, 02:01

Hi, is it possible to pass statements on the string, ignoring some part of the string?

Code: Select all

string := "    Name of custody accountCustody accountMarket Value in DKKType of custody account"
if (string = "    Name of custody accountCustody accountMarket Value in ***Type of custody account") ; I want to exclude DKK part, which can by any other 3 charakters
	MsgBox pass
else
	msgbox not pass
Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: String ignoring some character

08 May 2019, 04:10

euras wrote:
08 May 2019, 02:01
Hi, is it possible to pass statements on the string, ignoring some part of the string?
I want to exclude DKK part, which can by any other 3 charakters
You can use RegEx:

Code: Select all

string := "    Name of custody accountCustody accountMarket Value in DKKType of custody account"
if RegExMatch(string, "    Name of custody accountCustody accountMarket Value in .{3}Type of custody account") 
	MsgBox pass
else
	msgbox not pass
ExitApp
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk, Ragnar, septrinus and 306 guests