J'essaye de récupérer une chaine de caractère dans un formulaire en délimitant par 2 expressions régulières. _StringBetween n'est donc pas utile (supporte pas les regex).
Mon pattern me semble bon mais ne fonctionne pas, je crois qu'il faut inclure qu'on désire récupérer les sauts de ligne.
Mon formulaire se présente sous la forme :
Code : Tout sélectionner
1. QUESTION DE PLUSIEURS MOTS EN MAJUSCULE? réponse possible ici
2. QUESTION DE PLUSIEURS MOTS EN MAJUSCULE SANS POINT D'INTERROGATION
réponse possible ici
4. QUESTION IDENTIQUE DE PLUSIEURS MOTS EN MAJUSCULE SANS POINT D'INTERROGATION
réponse possible iciCode : Tout sélectionner
if StringRegExp($txt, 'MAJUSCULE\?') then
$question1 = StringRegExp($txt, 'MAJUSCULE\?'(.*?)[0-9]\.') ;regex simple
_ArrayDisplay($question1)
EndIf
if StringRegExp($txt, 'INTERROGATION') then
$question2 = StringRegExp($txt, 'INTERROGATION(.*?)[0-9]\.\s+[A-Z]') ;regex souhaité (fin de la question (.*?) chiffre+point+espace(plusieurs possible)+majuscule)
_ArrayDisplay($question2)
EndIf

