#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)process\s+(\w+|\"[^\"]+\"|'[^']+')\s*{((.|\n|\r)*)}"
Local $sString = "nextflow.enable.dsl=2" & @CRLF & _
"" & @CRLF & _
"// params.module_dir = '.'" & @CRLF & _
"params.dbs_dir = '/mnt/OmicNAS/dd/alphafold/dbs'" & @CRLF & _
"params.max_template_date = '2020-05-14'" & @CRLF & _
"params.db_preset = 'reduced_dbs'" & @CRLF & _
"params.model_preset = 'monomer'" & @CRLF & _
"params.outdir = './'" & @CRLF & _
"params.cachedir = '/mnt/OmicNAS/cache/alphafold'" & @CRLF & _
"" & @CRLF & _
"process ALPHAFOLD {" & @CRLF & _
" conda "${moduleDir}/environment.yml"" & @CRLF & _
"" & @CRLF & _
" echo true" & @CRLF & _
"" & @CRLF & _
" maxForks 1" & @CRLF & _
"" & @CRLF & _
" stageInMode 'copy'" & @CRLF & _
"" & @CRLF & _
" storeDir "${params.cachedir}"" & @CRLF & _
"" & @CRLF & _
" publishDir "${params.outdir}", mode: 'copy'" & @CRLF & _
"" & @CRLF & _
" input:" & @CRLF & _
" path fasta" & @CRLF & _
"" & @CRLF & _
" output:" & @CRLF & _
" path "*", emit: outputs" & @CRLF & _
"" & @CRLF & _
" script:" & @CRLF & _
" """" & @CRLF & _
" python3 ${moduleDir}/docker/run_docker.py \" & @CRLF & _
" --fasta_paths=${fasta} \" & @CRLF & _
" --max_template_date=${params.max_template_date} \" & @CRLF & _
" --model_preset=${params.model_preset} \" & @CRLF & _
" --db_preset=${params.db_preset} \" & @CRLF & _
" --data_dir=${params.dbs_dir} \" & @CRLF & _
" --output_dir=\$PWD" & @CRLF & _
" """" & @CRLF & _
"}" & @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