#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^.*(?=(?:[^\sA-Z]*[A-Z]){2})"
Local $sString = "Unseen ServanTThis creature can be summoned with the spell Unseen Servant.Unseen ServantCreature -1No AlignmentMediumMindlessSource Core Rulebook pg. 380Perception +0; darkvisionLanguages - (understands its creator)Skills Stealth +8Str -4, Dex +2, Con +0, Int -5, Wis +0, Cha +0Invisible An unseen servant is invisible, though it normally doesn’t Sneak, so it is usually only hidden.AC 13, Fort +0, Ref +4, Will +0HP 4; Immunities disease, mental, non-magical attacks, paralysis, poison, precision, unconscious" & @CRLF & _
"; Resistances all damage 5 (except force or ghost touch)Speed fly 30 feetForce Body An unseen servant’s physical body is made of force. It can’t use attack actions. It can move and use Interact actions to do things such as fetch objects, open unstuck or unlocked doors, hold chairs, and clean. It can’t pass through solid objects." & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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