Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
[[abc][def]]
/
gJD

Description

#include <StringConstants.au3> ; to declare the Constants of StringRegExp #include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate

Local $sRegex = "(?JD)[[abc][def]]" Local $sString = "ab123cd"

Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH) Local $aFullArray[0] For $i = 0 To UBound($aArray) -1 _ArrayConcatenate($aFullArray, $aArray[$i]) Next $aArray = $aFullArray

; Present the entire match result _ArrayDisplay($aArray, "Result")

Submitted by anonymous - 19 days ago