[PHP] Regular Expressions

2004-08-05 Thread Arik Raffael Funke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi together, I have a question about regular expressions. I want to get from following text... test: abc def ghi ...following... abc def ghi Can anybody tell me why preg_match("/test([.\n]*)/",...) does not work? And who is it done properly? Thank

Re: [PHP] Regular Expressions

2004-07-15 Thread Arik Raffael Funke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 15 Jul 2004 08:02:13 -0500 "Matt M." <[EMAIL PROTECTED]> wrote: > > Obviously the new-line is missed. Any thoughts on this? > > > > sample code: > > ereg("Last Name:\s*(.*)\n", $strInput, $regs) > > echo $regs[1]; > > try this: > > ereg("La

[PHP] Regular Expressions

2004-07-15 Thread Arik Raffael Funke
-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: Jaso