Regular Expressions

From: Date: Thu, 15 Jul 2004 12:40:24 +0000
Subject: Regular Expressions
Groups: php.general 
Request: Send a blank email to php-general+get-190583@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello together, I am havin trouble with php regular expressions. I would like to implement following pattern "Last Name:\s*(.*)\n". - From following text, Name: James Last Name: Jason Street: abc I get just 'Jason'. But what I currently get is: Jason Street: abc Obviously the new-line is missed. Any thoughts on this? sample code: ereg("Last Name:\s*(.*)\n", $strInput, $regs) echo $regs[1]; Thanks for the help! Cheers, Arik -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) iD8DBQFA9ns4//PXyz2NiW8RAuLDAJ0eBoCsJvT919/9xoVdk+BUkc8pegCeJ6O0 PxeXTxOwxr4WF639fZpDFYs= =3BQA -----END PGP SIGNATURE-----

« previous php.general (#190583) next »