#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)<groupId>([^<]*)<\/groupId>\n[[:space:]]*<artifactId>([^<]*)<\/artifactId>\n[[:space:]]*<version>([^<]*)<\/version>"
Local $sString = "<?xml version="1.0" encoding="UTF-8"?>" & @CRLF & _
"" & @CRLF & _
"<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">" & @CRLF & _
" <modelVersion>4.0.0</modelVersion>" & @CRLF & _
"" & @CRLF & _
" <groupId>com.bluesoft.muleesb</groupId>" & @CRLF & _
" <artifactId>Magellan23888Adapter</artifactId>" & @CRLF & _
" <version>1.0.0-SNAPSHOT</version>" & @CRLF & _
" <packaging>mule-application</packaging>" & @CRLF & _
"" & @CRLF & _
" <name>Magellan23888Adapter</name>" & @CRLF & _
"" & @CRLF & _
" <properties>" & @CRLF & _
" <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>" & @CRLF & _
" <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>" & @CRLF & _
" <app.runtime>4.3.0</app.runtime>" & @CRLF & _
" <mule.maven.plugin.version>3.3.5</mule.maven.plugin.version>" & @CRLF & _
" </properties>" & @CRLF & _
"" & @CRLF & _
" <build>" & @CRLF & _
" <plugins>" & @CRLF & _
" <plugin>" & @CRLF & _
" <groupId>org.mule.tools.maven</groupId>" & @CRLF & _
" <artifactId>mule-maven-plugin</artifactId>" & @CRLF & _
" <version>${mule.maven.plugin.version}</version>" & @CRLF & _
" <extensions>true</extensions>" & @CRLF & _
" <configuration>" & @CRLF & _
" <sharedLibraries>" & @CRLF & _
" <sharedLibrary>" & @CRLF & _
" <groupId>com.ibm.mq</groupId>" & @CRLF & _
" <artifactId>com.ibm.mq.allclient</artifactId>" & @CRLF & _
" </sharedLibrary>" & @CRLF & _
" </sharedLibraries>" & @CRLF & _
" <classifier>mule-application</classifier>" & @CRLF & _
" </configuration>" & @CRLF & _
" </plugin>" & @CRLF & _
" </plugins>" & @CRLF & _
" </build>" & @CRLF & _
" <distributionManagement>" & @CRLF & _
" <repository>" & @CRLF & _
" <id>releases</id>" & @CRLF & _
" <name>bluesoft releases</name>" & @CRLF & _
" <url>http://nexus.bluesoft.com/repository/releases</url>" & @CRLF & _
" </repository>" & @CRLF & _
" <snapshotRepository>" & @CRLF & _
" <id>snapshots</id>" & @CRLF & _
" <name>bluesoft snapshots</name>" & @CRLF & _
" <url>http://nexus.bluesoft.com/repository/snapshots</url>" & @CRLF & _
" </snapshotRepository>" & @CRLF & _
" </distributionManagement>" & @CRLF & _
" <dependencies>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>com.mulesoft.connectors</groupId>" & @CRLF & _
" <artifactId>mule-x12-connector</artifactId>" & @CRLF & _
" <version>2.6.2</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" <exclusions>" & @CRLF & _
" <exclusion>" & @CRLF & _
" <groupId>org.apache.logging.log4j</groupId>" & @CRLF & _
" <artifactId>log4j-core</artifactId>" & @CRLF & _
" </exclusion>" & @CRLF & _
" <exclusion>" & @CRLF & _
" <groupId>org.apache.logging.log4j</groupId>" & @CRLF & _
" <artifactId>log4j-api</artifactId>" & @CRLF & _
" </exclusion>" & @CRLF & _
" </exclusions>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.connectors</groupId>" & @CRLF & _
" <artifactId>mule-objectstore-connector</artifactId>" & @CRLF & _
" <version>1.1.7</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>com.ibm.mq</groupId>" & @CRLF & _
" <artifactId>com.ibm.mq.allclient</artifactId>" & @CRLF & _
" <version>9.2.1.0</version>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.modules</groupId>" & @CRLF & _
" <artifactId>mule-json-module</artifactId>" & @CRLF & _
" <version>2.1.3</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.apache.commons</groupId>" & @CRLF & _
" <artifactId>commons-lang3</artifactId>" & @CRLF & _
" <version>3.12.0</version>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.connectors</groupId>" & @CRLF & _
" <artifactId>mule-http-connector</artifactId>" & @CRLF & _
" <version>1.5.6</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.connectors</groupId>" & @CRLF & _
" <artifactId>mule-file-connector</artifactId>" & @CRLF & _
" <version>1.3.3</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>com.mulesoft.connectors</groupId>" & @CRLF & _
" <artifactId>mule-ibm-mq-connector</artifactId>" & @CRLF & _
" <version>1.6.3</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.connectors</groupId>" & @CRLF & _
" <artifactId>mule-sftp-connector</artifactId>" & @CRLF & _
" <version>1.4.0</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>com.mulesoft.modules</groupId>" & @CRLF & _
" <artifactId>mule-secure-configuration-property-module</artifactId>" & @CRLF & _
" <version>1.1.0</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.mule.connectors</groupId>" & @CRLF & _
" <artifactId>mule-email-connector</artifactId>" & @CRLF & _
" <version>1.4.1</version>" & @CRLF & _
" <classifier>mule-plugin</classifier>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.apache.logging.log4j</groupId>" & @CRLF & _
" <artifactId>log4j-core</artifactId>" & @CRLF & _
" <version>2.16.0</version>" & @CRLF & _
" </dependency>" & @CRLF & _
" <dependency>" & @CRLF & _
" <groupId>org.apache.logging.log4j</groupId>" & @CRLF & _
" <artifactId>log4j-api</artifactId>" & @CRLF & _
" <version>2.16.0</version>" & @CRLF & _
" </dependency>" & @CRLF & _
" </dependencies>" & @CRLF & _
"" & @CRLF & _
" <repositories>" & @CRLF & _
" <repository>" & @CRLF & _
" <id>bluesoft-nexus</id>" & @CRLF & _
" <name>bluesoft Nexus</name>" & @CRLF & _
" <url>https://nexus.bluesoft.com/content/groups/public</url>" & @CRLF & _
" <layout>default</layout>" & @CRLF & _
" </repository>" & @CRLF & _
" </repositories>" & @CRLF & _
" <pluginRepositories>" & @CRLF & _
" <pluginRepository>" & @CRLF & _
" <id>bluesoft-nexus-plugins</id>" & @CRLF & _
" <name>bluesoft Nexus</name>" & @CRLF & _
" <layout>default</layout>" & @CRLF & _
" <url>https://nexus.bluesoft.com/content/groups/public</url>" & @CRLF & _
" <snapshots>" & @CRLF & _
" <enabled>false</enabled>" & @CRLF & _
" </snapshots>" & @CRLF & _
" </pluginRepository>" & @CRLF & _
" </pluginRepositories>" & @CRLF & _
"" & @CRLF & _
"</project>"
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