Same way, use _StringBetween
#include <String.au3>
$s = "blablabla vous envoie ce message : "
Msgbox(0,"", _StringBetween($s, "", ' vous envoie')[0] )
It's a pretty nice solution if you don't feel sure with regex
OK, here is an example
#include <Array.au3>
$s = "[ANAH][88][Demandeur][45896_1529768635] Question concernant mon dossier "
$a = StringRegExp($s, '\[([^\]]+)\]', 3)
_ArrayDisplay($a)
explanations :
the brackets are escaped when used as literals because they are special characters
In the capturing group, [...] is a character class (refer to the help file), and ^\] means "a char which is not a closing bracket"
So literally, the expression \[([^\]]+)\] means : "get one or more chars, included in brackets, which are not a closing bracket"