#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<=\,)\d{2}"
Local $sString = "http://regexr.com" & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"Welcome to RegExr v2.1 by gskinner.com, proudly hosted by Media Temple!" & @CRLF & _
"" & @CRLF & _
"Edit the Expression & Text to see matches. Roll over – matches – or the expression for details. Undo mistakes with cmd-z. Save Favorites & Share $33 expressions with «friends or the Community. Explore your results with Tools. A full Reference & Help is available $2 in the Library, or watch the video Tutorial." & @CRLF & _
"" & @CRLF & _
"année 201, années 1969 à 1974, – anné 2015, mois 2013" & @CRLF & _
" " & @CRLF & _
"Voici un -deuxième- paragraphe, avec – ÉT “retour” « régulier »." & @CRLF & _
"Une clause clause inefficace suivi d’une autre clause." & @CRLF & _
"La suite du texte se — poursuit toujours — normalement." & @CRLF & _
"" & @CRLF & _
"Voici un autre paragraphe avec un retour forcé (shift return)." & @CRLF & _
"Nous verrons comment les GREP saisiront cette donnée." & @CRLF & _
"" & @CRLF & _
"Les GREPs sont intégrés dans ces 2 applications — InDesign et Dreamweaver!" & @CRLF & _
"InDesign,InDesign 2.0, “InDesign CS” and InDesign CS2" & @CRLF & _
"The quick brown fox jumps up and down." & @CRLF & _
"abc abc abc abc" & @CRLF & _
"BONJOUR SOLEIL." & @CRLF & _
" " & @CRLF & _
" Tot, tot, Toto, toto, totoo, totoooo, tatoo, tato, teratatotinotto" & @CRLF & _
"" & @CRLF & _
"• $22.999, 23,99$, 19.99 $" & @CRLF & _
"$2.99, 22,99$, 2,99$, 2,99 $" & @CRLF & _
"2.53%, 20%" & @CRLF & _
"1.89L, 1,89 L — 2 pour 1$" & @CRLF & _
"514-123-4567 " & @CRLF & _
"• h4N 1X7" & @CRLF & _
"• h8t" & @CRLF & _
"• h4N1X72 Ajout code postal" & @CRLF & _
"• h8T" & @CRLF & _
"mot à trouver" & @CRLF & _
"Charles ixv" & @CRLF & _
"1/3, 234/56" & @CRLF & _
" " & @CRLF & _
"12h22, 12:00, 12am, 12 pm, 11h30 am, 8 PM, 6H15, 08:00, 6.00 pm" & @CRLF & _
"année 2017, années 1970 à 1974, anné 2016, mois 2014" & @CRLF & _
"22/11/2016, 01-08-2017, 01|02|2015, 20.12.2014, 2/3/2012" & @CRLF & _
" " & @CRLF & _
"Sample text for testing:" & @CRLF & _
"SAMPLE" & @CRLF & _
"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ" & @CRLF & _
"" & @CRLF & _
"0123456789 _+-.,!@#$%^&*();\/|<>”’" & @CRLF & _
"12345 -98.7 3.141 .6180 9,000 +42" & @CRLF & _
"1234 - 5678, 1234 - 1234" & @CRLF & _
"3oF, -10oC" & @CRLF & _
" " & @CRLF & _
"555.123.4567 +1-(800)-555-2468" & @CRLF & _
"(123)-(456)-(7890)" & @CRLF & _
"(xxx (xxx) xxxxx (xx) xxx)" & @CRLF & _
"foo@demo.net bar.ba@test.co.uk" & @CRLF & _
"good4you@yummy.com" & @CRLF & _
"somebody@somewhere.ca, another.somebody@coucouland.com" & @CRLF & _
"www.demo.com http://foo.co.uk/" & @CRLF & _
"http://regexr.com/foo.html?q=bar" & @CRLF & _
"https://mediatemple.netx" & @CRLF & _
" " & @CRLF & _
"76 g ou/or 85 g" & @CRLF & _
" 22,99 ch./ ea." & @CRLF & _
"22.99" & @CRLF & _
"222,22" & @CRLF & _
"2,222" & @CRLF & _
"22,222 22," & @CRLF & _
",11," & @CRLF & _
"22,22$" & @CRLF & _
"22,22 $" & @CRLF & _
"195 ml, 273 ml ou/or 198 g " & @CRLF & _
"1 $" & @CRLF & _
""
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")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm