Originariamente inviato da Paul90
mi potresti spiegare allora perchè nella matrice come l'ho scritta io risulta un output e invece come l'hai scritta tu ne risulta un altro(corretto)?
Perchè come tu mi hai giustamente fatto notare l'output cambia... e quindi solo ora ho capito che il mio problema non era la ER bensi' la sbagliata lettura della matrice...
Da manuale:
codice:
If matches is provided, then it is filled with the results of search.
$matches[0] will contain the text that matched the full pattern,
$matches[1] will have the text that matched the first captured parenthesized subpattern, and so on.