Re: collect string from string

Re: collect string from string

am 22.04.2010 19:39:14 von Ashley Sheridan

--=-9rV5DVMIzjNOGLPVjQM1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, 2010-04-22 at 23:41 +0600, saeed ahmed wrote:

> hello friend,
>=20
> I have a string like below
> "
>=20
> ===3DPronunciation===3D
> * {{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|tee|ti}}
>=20
>=20
> # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> ''[[w:Camellia sinensis|Camellia sinensis]]''.
> #: ''Go to the supermarket and buy some '''tea'''.''
> # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> leaves or buds in hot water.
> ====Usage notes====
> In the [[United Kingdom]], [[Canada]], other English speaking
> [[Commonwealth]] countries, and in northern areas of the [[United
> States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
> in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> in cups such as for large groups or for [[takeout]].
>=20
> In southern areas of the United States, ''tea'' is assumed to mean
> [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> with separate [[glass]]es or directly in glasses.
>=20
> Strictly speaking, "tea" has been reserved for [[infusion]]s made from
> leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> has been extended to include the herbal infusions.
>=20
> ====Synonyms====
> * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> * {{italbrac-colon|drink made by infusing parts of various other
> plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
>=20
> ====Derived terms====
>=20
> "
>=20
> now I want to collect only the string which are start with '#'. how
> can I do this? please suggest me.
>=20
>=20
> -----
> Regards
> Saeed Ahmed
> http://saeed05.wordpress.com
> -----


If the text is in a file, use file() to read the contents into an array
and then check the first character.

Alternatively, if the text is in a string, you could use a regex to pull
out only matching lines. This is an untested regex, but it should do the
trick:

/^(\#.+)$/g

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-9rV5DVMIzjNOGLPVjQM1--

collect string from string

am 22.04.2010 19:41:02 von saeed ahmed

--00c09f97296c8358240484d6d05d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

hello friend,

I have a string like below
"

===3DPronunciation===3D
* {{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|tee|ti}}


# {{uncountable}} The dried leaves or buds of the [[tea plant]],
''[[w:Camellia sinensis|Camellia sinensis]]''.
#: ''Go to the supermarket and buy some '''tea'''.''
# {{uncountable}} The drink made by [[infuse|infusing]] these dried
leaves or buds in hot water.
====Usage notes====
In the [[United Kingdom]], [[Canada]], other English speaking
[[Commonwealth]] countries, and in northern areas of the [[United
States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
in a [[teapot]] with separate [[cup]]s, or sometimes served directly
in cups such as for large groups or for [[takeout]].

In southern areas of the United States, ''tea'' is assumed to mean
[[iced tea]] and is usually served with ice, either in a [[pitcher]]
with separate [[glass]]es or directly in glasses.

Strictly speaking, "tea" has been reserved for [[infusion]]s made from
leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
[[chamomile]] are called [[tisane]]s. In recent years the word "tea"
has been extended to include the herbal infusions.

====Synonyms====
* {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
* {{italbrac-colon|drink made by infusing parts of various other
plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]

====Derived terms====

"

now I want to collect only the string which are start with '#'. how
can I do this? please suggest me.


-----
Regards
Saeed Ahmed
http://saeed05.wordpress.com
-----

--00c09f97296c8358240484d6d05d--

Re: collect string from string

am 22.04.2010 22:38:03 von saeed ahmed

--0016364d31958c10510484d9493c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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
> "
>
> ===3DPronunciation===3D
> * {{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|tee|ti}}
>
>
> # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> ''[[w:Camellia sinensis|Camellia sinensis]]''.
> #: ''Go to the supermarket and buy some '''tea'''.''
> # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> leaves or buds in hot water.
> ====Usage notes====
> In the [[United Kingdom]], [[Canada]], other English speaking
> [[Commonwealth]] countries, and in northern areas of the [[United
> States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
> in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> in cups such as for large groups or for [[takeout]].
>
> In southern areas of the United States, ''tea'' is assumed to mean
> [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> with separate [[glass]]es or directly in glasses.
>
> Strictly speaking, "tea" has been reserved for [[infusion]]s made from
> leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> has been extended to include the herbal infusions.
>
> ====Synonyms====
> * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> * {{italbrac-colon|drink made by infusing parts of various other
> plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
>
> ====Derived terms====
>
> "
>
> now I want to collect only the string which are start with '#'. how
> can I do this? please suggest me.
>
>
> -----
> Regards
> Saeed Ahmedhttp://saeed05.wordpress.com
> -----
>
>
> If the text is in a file, use file() to read the contents into an array a=
nd
> then check the first character.
>
> Alternatively, if the text is in a string, you could use a regex to pull
> out only matching lines. This is an untested regex, but it should do the
> trick:
>
> /^(\#.+)$/g
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

--0016364d31958c10510484d9493c--

Re: collect string from string

am 23.04.2010 00:40:29 von Ashley Sheridan

--=-A4OxSXNRSeWtLSpOBC/y
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 2010-04-23 at 02:38 +0600, saeed ahmed wrote:

> this is not working
>=20
> /^(\#.+)$/g
>=20
> I have tried the preg_match function
>=20
> -----
> Regards
> Saeed Ahmed
> http://saeed05.wordpress.com
> -----
>=20
>=20
> On Thu, Apr 22, 2010 at 11:39 PM, Ashley Sheridan
> wrote:
>=20
> > On Thu, 2010-04-22 at 23:41 +0600, saeed ahmed wrote:
> >
> > hello friend,
> >
> > I have a string like below
> > "
> >
> > ===3DPronunciation===3D
> > * {{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|tee|ti}}
> >
> >
> > # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> > ''[[w:Camellia sinensis|Camellia sinensis]]''.
> > #: ''Go to the supermarket and buy some '''tea'''.''
> > # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> > leaves or buds in hot water.
> > ====Usage notes====
> > In the [[United Kingdom]], [[Canada]], other English speaking
> > [[Commonwealth]] countries, and in northern areas of the [[United
> > States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
> > in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> > in cups such as for large groups or for [[takeout]].
> >
> > In southern areas of the United States, ''tea'' is assumed to mean
> > [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> > with separate [[glass]]es or directly in glasses.
> >
> > Strictly speaking, "tea" has been reserved for [[infusion]]s made from
> > leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> > made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> > [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> > has been extended to include the herbal infusions.
> >
> > ====Synonyms====
> > * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> > * {{italbrac-colon|drink made by infusing parts of various other
> > plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
> >
> > ====Derived terms====
> >
> > "
> >
> > now I want to collect only the string which are start with '#'. how
> > can I do this? please suggest me.
> >
> >
> > -----
> > Regards
> > Saeed Ahmedhttp://saeed05.wordpress.com
> > -----
> >
> >
> > If the text is in a file, use file() to read the contents into an array=
and
> > then check the first character.
> >
> > Alternatively, if the text is in a string, you could use a regex to pul=
l
> > out only matching lines. This is an untested regex, but it should do th=
e
> > trick:
> >
> > /^(\#.+)$/g
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >


Do you have a bit more information other than 'not working'. Are you
receiving an error of some kind? I'm assuming your data is in a string
variable if you're using preg_match() yes?

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-A4OxSXNRSeWtLSpOBC/y--

Re: collect string from string

am 23.04.2010 00:42:54 von Ashley Sheridan

--=-X7xxjeXR6RQ14Bdydpu9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, 2010-04-23 at 00:44 +0200, Michiel Sikma wrote:

> You need to use the multiline modifier.
>=20
> Try this:
> preg_match_all("/^(\#.*)/im", $my_string, $matches);
> print_r($matches);
>=20
> The result:
>=20
> Array
> (
> [0] =3D> Array
> (
> [0] =3D> # {{uncountable}} The dried leaves or buds of the [[=
tea
> plant]],
> [1] =3D> #: ''Go to the supermarket and buy some '''tea'''.''
> [2] =3D> # {{uncountable}} The drink made by [[infuse|infusin=
g]]
> these dried
> )
>=20
> [1] =3D> Array
> (
> [0] =3D> # {{uncountable}} The dried leaves or buds of the [[=
tea
> plant]],
> [1] =3D> #: ''Go to the supermarket and buy some '''tea'''.''
> [2] =3D> # {{uncountable}} The drink made by [[infuse|infusin=
g]]
> these dried
> )
>=20
> )
>=20
> Michiel
>=20
> On 22 April 2010 22:38, saeed ahmed wrote:
>=20
> > 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
> > > "
> > >
> > > ===3DPronunciation===3D
> > > * {{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|tee|ti}}
> > >
> > >
> > > # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> > > ''[[w:Camellia sinensis|Camellia sinensis]]''.
> > > #: ''Go to the supermarket and buy some '''tea'''.''
> > > # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> > > leaves or buds in hot water.
> > > ====Usage notes====
> > > In the [[United Kingdom]], [[Canada]], other English speaking
> > > [[Commonwealth]] countries, and in northern areas of the [[United
> > > States]], ''tea'' is assumed to mean [[hot]] tea and is usually serve=
d
> > > in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> > > in cups such as for large groups or for [[takeout]].
> > >
> > > In southern areas of the United States, ''tea'' is assumed to mean
> > > [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> > > with separate [[glass]]es or directly in glasses.
> > >
> > > Strictly speaking, "tea" has been reserved for [[infusion]]s made fro=
m
> > > leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> > > made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> > > [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> > > has been extended to include the herbal infusions.
> > >
> > > ====Synonyms====
> > > * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> > > * {{italbrac-colon|drink made by infusing parts of various other
> > > plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
> > >
> > > ====Derived terms====
> > >
> > > "
> > >
> > > now I want to collect only the string which are start with '#'. how
> > > can I do this? please suggest me.
> > >
> > >
> > > -----
> > > Regards
> > > Saeed Ahmedhttp://saeed05.wordpress.com
> > > -----
> > >
> > >
> > > If the text is in a file, use file() to read the contents into an arr=
ay
> > and
> > > then check the first character.
> > >
> > > Alternatively, if the text is in a string, you could use a regex to p=
ull
> > > out only matching lines. This is an untested regex, but it should do =
the
> > > trick:
> > >
> > > /^(\#.+)$/g
> > >
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> > >
> > >
> >


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



--=-X7xxjeXR6RQ14Bdydpu9--

Re: collect string from string

am 23.04.2010 00:44:23 von Michiel Sikma

--0016e65b611454ed4e0484db0dee
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

You need to use the multiline modifier.

Try this:
preg_match_all("/^(\#.*)/im", $my_string, $matches);
print_r($matches);

The result:

Array
(
[0] =3D> Array
(
[0] =3D> # {{uncountable}} The dried leaves or buds of the [[te=
a
plant]],
[1] =3D> #: ''Go to the supermarket and buy some '''tea'''.''
[2] =3D> # {{uncountable}} The drink made by [[infuse|infusing]=
]
these dried
)

[1] =3D> Array
(
[0] =3D> # {{uncountable}} The dried leaves or buds of the [[te=
a
plant]],
[1] =3D> #: ''Go to the supermarket and buy some '''tea'''.''
[2] =3D> # {{uncountable}} The drink made by [[infuse|infusing]=
]
these dried
)

)

Michiel

On 22 April 2010 22:38, 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-04-22 at 23:41 +0600, saeed ahmed wrote:
> >
> > hello friend,
> >
> > I have a string like below
> > "
> >
> > ===3DPronunciation===3D
> > * {{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|tee|ti}}
> >
> >
> > # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> > ''[[w:Camellia sinensis|Camellia sinensis]]''.
> > #: ''Go to the supermarket and buy some '''tea'''.''
> > # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> > leaves or buds in hot water.
> > ====Usage notes====
> > In the [[United Kingdom]], [[Canada]], other English speaking
> > [[Commonwealth]] countries, and in northern areas of the [[United
> > States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
> > in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> > in cups such as for large groups or for [[takeout]].
> >
> > In southern areas of the United States, ''tea'' is assumed to mean
> > [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> > with separate [[glass]]es or directly in glasses.
> >
> > Strictly speaking, "tea" has been reserved for [[infusion]]s made from
> > leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> > made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> > [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> > has been extended to include the herbal infusions.
> >
> > ====Synonyms====
> > * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> > * {{italbrac-colon|drink made by infusing parts of various other
> > plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
> >
> > ====Derived terms====
> >
> > "
> >
> > now I want to collect only the string which are start with '#'. how
> > can I do this? please suggest me.
> >
> >
> > -----
> > Regards
> > Saeed Ahmedhttp://saeed05.wordpress.com
> > -----
> >
> >
> > If the text is in a file, use file() to read the contents into an array
> and
> > then check the first character.
> >
> > Alternatively, if the text is in a string, you could use a regex to pul=
l
> > out only matching lines. This is an untested regex, but it should do th=
e
> > trick:
> >
> > /^(\#.+)$/g
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>

--0016e65b611454ed4e0484db0dee--

Re: collect string from string

am 23.04.2010 00:52:18 von saeed ahmed

--0016363100e1afb3240484db29da
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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
>
> /^(\#.+)$/g
>
> I have tried the preg_match function
>
> -----
> Regards
> Saeed Ahmedhttp://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
> > "
> >
> > ===3DPronunciation===3D
> > * {{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|tee|ti}}
> >
> >
> > # {{uncountable}} The dried leaves or buds of the [[tea plant]],
> > ''[[w:Camellia sinensis|Camellia sinensis]]''.
> > #: ''Go to the supermarket and buy some '''tea'''.''
> > # {{uncountable}} The drink made by [[infuse|infusing]] these dried
> > leaves or buds in hot water.
> > ====Usage notes====
> > In the [[United Kingdom]], [[Canada]], other English speaking
> > [[Commonwealth]] countries, and in northern areas of the [[United
> > States]], ''tea'' is assumed to mean [[hot]] tea and is usually served
> > in a [[teapot]] with separate [[cup]]s, or sometimes served directly
> > in cups such as for large groups or for [[takeout]].
> >
> > In southern areas of the United States, ''tea'' is assumed to mean
> > [[iced tea]] and is usually served with ice, either in a [[pitcher]]
> > with separate [[glass]]es or directly in glasses.
> >
> > Strictly speaking, "tea" has been reserved for [[infusion]]s made from
> > leaves of ''[[w:Camellia sinensis|Camellia sinensis]]''. Infusions
> > made from other [[herb]]s such as [[rooibos]], [[mint]]{{,}} and
> > [[chamomile]] are called [[tisane]]s. In recent years the word "tea"
> > has been extended to include the herbal infusions.
> >
> > ====Synonyms====
> > * {{italbrac-colon|dried leaves of tea plant}} [[tea leaves]]
> > * {{italbrac-colon|drink made by infusing parts of various other
> > plants}} [[herb tea]], [[herbal tea]], [[infusion]], [[tisane]]
> >
> > ====Derived terms====
> >
> > "
> >
> > now I want to collect only the string which are start with '#'. how
> > can I do this? please suggest me.
> >
> >
> > -----
> > Regards
> > Saeed Ahmedhttp://saeed05.wordpress.com
>
> > -----
> >
> >
> > If the text is in a file, use file() to read the contents into an array=
and
> > then check the first character.
> >
> > Alternatively, if the text is in a string, you could use a regex to pul=
l
> > out only matching lines. This is an untested regex, but it should do th=
e
> > trick:
> >
> > /^(\#.+)$/g
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>
>
> Do you have a bit more information other than 'not working'. Are you
> receiving an error of some kind? I'm assuming your data is in a string
> variable if you're using preg_match() yes?
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

--0016363100e1afb3240484db29da--

Re: collect string from string

am 23.04.2010 00:56:50 von Michiel Sikma

--0016e6d99d03e5f8d40484db3910
Content-Type: text/plain; charset=UTF-8

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 global modifier in other implementations (JS, Perl, Java, etc), but
it doesn't quite work like the multiline modifier in those implementations
either. The effect of having it is like the difference between PHP's
preg_match() and preg_match_all(). That's why PHP actually doesn't have a g
modifier.

Michiel

--0016e6d99d03e5f8d40484db3910--