Re: [PHP] collect string from string

2010-04-22 Thread Michiel Sikma
On 23 April 2010 00:42, Ashley Sheridan wrote: > On Fri, 2010-04-23 at 00:44 +0200, Michiel Sikma wrote: > -snip- > Ah, ignore my last reply then! I used the g modifier, forgetting it wasn't > the multi-line one in PHP! > > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > It's the glob

Re: [PHP] collect string from string

2010-04-22 Thread saeed ahmed
yes I have used preg_match_all and preg_match. now its working. thanks a lot guys - Regards Saeed Ahmed http://saeed05.wordpress.com - On Fri, Apr 23, 2010 at 4:40 AM, Ashley Sheridan wrote: > On Fri, 2010-04-23 at 02:38 +0600, saeed ahmed wrote: > > > this is not working > > /^(\#.+)

Re: [PHP] collect string from string

2010-04-22 Thread Ashley Sheridan
On Fri, 2010-04-23 at 00:44 +0200, Michiel Sikma wrote: > You need to use the multiline modifier. > > Try this: > preg_match_all("/^(\#.*)/im", $my_string, $matches); > print_r($matches); > > The result: > > Array > ( > [0] => Array > ( > [0] => # {{uncountable}} The dri

Re: [PHP] collect string from string

2010-04-22 Thread Ashley Sheridan
On Fri, 2010-04-23 at 02:38 +0600, saeed ahmed wrote: > this is not working > > /^(\#.+)$/g > > I have tried the preg_match function > > - > Regards > Saeed Ahmed > http://saeed05.wordpress.com > - > > > On Thu, Apr 22, 2010 at 11:39 PM, Ashley Sheridan > wrote: > > > On Thu, 2010-0

Re: [PHP] collect string from string

2010-04-22 Thread Michiel Sikma
You need to use the multiline modifier. Try this: preg_match_all("/^(\#.*)/im", $my_string, $matches); print_r($matches); The result: Array ( [0] => Array ( [0] => # {{uncountable}} The dried leaves or buds of the [[tea plant]], [1] => #: ''Go to the supermark

Re: [PHP] collect string from string

2010-04-22 Thread saeed ahmed
this is not working /^(\#.+)$/g I have tried the preg_match function - Regards Saeed Ahmed http://saeed05.wordpress.com - On Thu, Apr 22, 2010 at 11:39 PM, Ashley Sheridan wrote: > On Thu, 2010-04-22 at 23:41 +0600, saeed ahmed wrote: > > hello friend, > > I have a string like below

Re: [PHP] collect string from string

2010-04-22 Thread Ashley Sheridan
On Thu, 2010-04-22 at 23:41 +0600, saeed ahmed wrote: > hello friend, > > I have a string like below > " > > ===Pronunciation=== > * {{enPR|tē}}, {{IPA|/tiː/}}, {{SAMPA|/ti:/}} > * {{audio|en-us-tea.ogg|Audio (US)}} > * {{audio|En-uk-tea.ogg|Audio (UK)}} > *: {{rhymes|iː}} > * {{homophones|T|te|