#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(^(?P<line_num>[1-9]|1[0-9]|2[0-2])\b +)(?P<qa_type>(Q|A|[mM][rR][\.|:]? [a-zA-Z]+|[mM][rR][sS][\.|:]? [a-zA-Z]+|[mM][sS][\.|:]? [a-zA-Z]+|[mM][iI][sS][sS][\.|:]? [a-zA-Z]+|[dD][rR][\.|:]? [a-zA-Z]+))?([\.|:|\s]+)?(?P<type_text>\b.*)|[pP][aA][gG][eE] (?P<page_num>\d{1,3})"
Local $sString = "1 sure I understand, in this figure, the bottom figure" & @CRLF & _
"" & @CRLF & _
"2 below Paragraph 88 that you prepared, to describe" & @CRLF & _
"" & @CRLF & _
"3 your combination of Mendelson '799/Ohsaki, is it" & @CRLF & _
"" & @CRLF & _
"4 intended to show the relative sizes of the various" & @CRLF & _
"" & @CRLF & _
"5 components?" & @CRLF & _
"" & @CRLF & _
"6 MR. SMITH: Objection; form." & @CRLF & _
"" & @CRLF & _
"7 A. No. I'd say it's purely an" & @CRLF & _
"" & @CRLF & _
"8 illustration to convey the concept of how one might" & @CRLF & _
"" & @CRLF & _
"9 combined these elements in order to achieve the" & @CRLF & _
"" & @CRLF & _
"10 benefits we've spoken of, using the convex cover to" & @CRLF & _
"" & @CRLF & _
"11 provide improved adhesion and improved -- I might as" & @CRLF & _
"" & @CRLF & _
"12 well read from the declaration -- "improved adhesion" & @CRLF & _
"" & @CRLF & _
"13 and detection and protection of the elements within."" & @CRLF & _
"" & @CRLF & _
"14 Q. Okay. And if a sensor like the one" & @CRLF & _
"" & @CRLF & _
"15 you showed in the bottom figure below Paragraph 88" & @CRLF & _
"" & @CRLF & _
"16 were used to take a physiological measurement, do you" & @CRLF & _
"" & @CRLF & _
"17 agree that the distribution of incoming light would" & @CRLF & _
"" & @CRLF & _
"18 be different as compared to the same sensor with no" & @CRLF & _
"" & @CRLF & _
"19 cover?" & @CRLF & _
"" & @CRLF & _
"20 MR. SMITH: Objection; form." & @CRLF & _
"" & @CRLF & _
"21 A. Yes, I agree that the convex cover" & @CRLF & _
"" & @CRLF & _
"22 creates refractive effects, which change the angles" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"4/25/2021 [Redacted Text] Vol II" & @CRLF & _
"" & @CRLF & _
"www.[Redacted Text].com [Redacted Text] 2021 [Redacted Text]" & @CRLF & _
"" & @CRLF & _
"Page 275" & @CRLF & _
"" & @CRLF & _
"1 of propagation of the rays of light. We are look at" & @CRLF & _
"" & @CRLF & _
"2 a diffuse light source, so there's many, many" & @CRLF & _
"" & @CRLF & _
"3 different possible rays that could you considered." & @CRLF & _
"" & @CRLF & _
"4 But they all will experience the laws of refraction" & @CRLF & _
"" & @CRLF & _
"5 and that changes the distribution." & @CRLF & _
"" & @CRLF & _
"6 Q. Let me now ask you about Paragraph 20" & @CRLF & _
"" & @CRLF & _
"7 of your report." & @CRLF & _
"" & @CRLF & _
"8 Here, you're discussing the level of" & @CRLF & _
"" & @CRLF & _
"9 ordinary skill in the art, correct?" & @CRLF & _
"" & @CRLF & _
"10 A. That's correct." & @CRLF & _
"" & @CRLF & _
"11 Q. And you refer here -- this is the" & @CRLF & _
"" & @CRLF & _
"12 first sentence. You say, "...a working knowledge of" & @CRLF & _
"" & @CRLF & _
"13 physiological monitoring technologies."" & @CRLF & _
"" & @CRLF & _
"14 Do you see that?" & @CRLF & _
"" & @CRLF & _
"15 A. Yes." & @CRLF & _
"" & @CRLF & _
"16 Q. What did you mean when you said that" & @CRLF & _
"" & @CRLF & _
"17 a person of ordinary skill in the art "would have" & @CRLF & _
"" & @CRLF & _
"18 been someone with a working knowledge of" & @CRLF & _
"" & @CRLF & _
"19 physiological monitoring technologies"?" & @CRLF & _
"" & @CRLF & _
"20 MR. SMITH: Objection; form." & @CRLF & _
"" & @CRLF & _
"21 A. They would have some knowledge of" & @CRLF & _
"" & @CRLF & _
"22 physiological monitoring technologies and would be" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"4/25/2021 [Redacted Text] Vol II" & @CRLF & _
"" & @CRLF & _
"www.[Redacted Text].com [Redacted Text] 2021 [Redacted Text]" & @CRLF & _
"" & @CRLF & _
"Page 276" & @CRLF & _
"15 Ms. Jones: Objection; Maserati are the best!." & @CRLF & _
"16 mr stevENS Loves this!" & @CRLF & _
"17 Dr. doe: Objection; Ferrari are the best!." & @CRLF & _
"4/25/2021 [Redacted Text] Vol II" & @CRLF & _
"" & @CRLF & _
"www.[Redacted Text].com [Redacted Text] 2021 [Redacted Text]" & @CRLF & _
"" & @CRLF & _
"Page 277"
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