RegExMatch - missing param, syntax problem

Issue #75 closed
Winter Laite created an issue

ISSUE: Keysharp’s RegExMatch only takes 3 parameters, in AHK there are four.

AHK sample code:

MsgBox(RegExMatch("xxxabc123xyz", "abc.*xyz"), "Ex 1 - s.b. 4") ; should yield 4

The '4' returned should be the missing parameter, as far as I can tell, i.e. the starting position of the match.

Attempted with Keysharp, the MsgBox yields

Keysharp.Core.RegExResults

Since an object is returned, the following was attempted:

MsgBox(RegExMatch("xxxabc123xyz", "abc.*xyz")[0], "Ex 1 - s.b. 4") ; should yield 4

This yields ‘abc123xyz’, which is the match, and not the position (which is never returned).

Comments (3)

  1. Winter Laite reporter

    Following conversations about syntax and a couple of commits, this should be closed. I understand now that Keysharp uses .NET regex, and not PCRE as AHK does.

  2. Log in to comment