In the look-behind assertionn, can't the condition be an option with a Non-fixed length?
For example, in the following example, I tried to match bc in abc,d with [^,]+. The expected result is d.
Code: Select all
abc,d
(?<=a[^,]+,)\w
Code: Select all
abc,d
(?<=a[^,]+,)\w
Look-ahead and look-behind assertions wrote: Look-behinds are more limited than look-aheads because they do not support quantifiers of varying size such as *, ?, and +.
Code: Select all
q:: ;test RegExMatch \K
RegExMatch("abc,d", "O)a[^,]+,\K\w", oMatch)
MsgBox, % oMatch.0
RegExMatch("abc,d", "O)a[^,]+,(\w)", oMatch)
MsgBox, % oMatch.1
return