hello, i was wondering if there is a better way or a cleaner way to do this with relguar expressions
#include <MsgBoxConstants.au3>
#include <StringConstants.au3>
$line = '<input type="checkbox" name="answers[b]" class="optInput" id="answers_b" /> <pre class="np">text/plain</pre>'
$strLetterLeft = 'name="answers['
$strLetterRight = ']"'
$findletter = StringRegExp($line, '\Q' & $strLetterLeft & '\E' & "(.*?)" & '\Q' & $strLetterRight & '\E' , 3, 1)
For $i = 0 To UBound($findletter) - 1
$strAnswerLeft = '<pre class="np">'
$strAnswerRight = '</pre>'
$findanswer = StringRegExp($line, $strAnswerLeft & "(.*?)" & $strAnswerRight , 3, 1)
For $i = 0 To UBound($findanswer) - 1
$stringrep2 = StringRegExpReplace($line, '<([^%]*?)/pre>', '<b>' & StringUpper($findletter[0]) & '.</b> ')
$varStringFinal = $stringrep2 & '<span class="np">' & $findanswer[0] & '</span>'
MsgBox(0, "replaced", $varStringFinal)
Next
Next