#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = ".*@company-gherkin:.*"
Local $sString = "	/**" & @CRLF & _
                "	 * #########################" & @CRLF & _
                "	 * Gherkin Glue Code" & @CRLF & _
                "	 * ########################" & @CRLF & _
                "	 */" & @CRLF & _
                "" & @CRLF & _
                "	@And(/^.*click next.*$/)" & @CRLF & _
                "	def clickNext() {" & @CRLF & _
                "		def selectNext = new TestObject('selectNext')" & @CRLF & _
                "		selectNext.addProperty("xpath", ConditionType.EQUALS, "//button[contains( text(), 'next')]", true)" & @CRLF & _
                "		WebUI.click(selectNext)" & @CRLF & _
                "	}" & @CRLF & _
                "" & @CRLF & _
                "	/**" & @CRLF & _
                "	 * @company-gherkin: Step: go to the list. Description: Navigates to the list." & @CRLF & _
                "	 */" & @CRLF & _
                "	@Given(/^.*go to the list.*$/)" & @CRLF & _
                "	def goToList() {" & @CRLF & _
                "		// open the browser" & @CRLF & _
                "		openWebBrowser()" & @CRLF & _
                "		WebUI.navigateToUrl(GlobalVariable.G_SiteURL)" & @CRLF & _
                "	}" & @CRLF & _
                "" & @CRLF & _
                "	/**" & @CRLF & _
                "	 * @company-gherkin: Step: select (.*) the item. Description: Select something to save, more than likely the usual. '(.*)' represents any value from the drop down list." & @CRLF & _
                "	 */" & @CRLF & _
                "	@And(/^.*select (.*) the item.*$/)" & @CRLF & _
                "	def selectFixture(String fixture) {" & @CRLF & _
                "		if(!fixture || fixture == " ") {" & @CRLF & _
                "			fixture = "theItem"" & @CRLF & _
                "		}" & @CRLF & _
                "		fixture = fixture.trim()" & @CRLF & _
                "		// println "fixture is:"+fixture" & @CRLF & _
                "" & @CRLF & _
                "		// Select iotaa from the drop down list" & @CRLF & _
                "		WebUI.selectOptionByValue(findTestObject('path/to/item'), fixture, false)" & @CRLF & _
                "	}" & @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