[nycphp-talk] How can PHP extract a pattern from a string into another string?

David Mintz dmintz at
Thu Aug 7 12:36:34 EDT 2003

Have you had a look at ? Note example 3 in

On Thu, 7 Aug 2003, Phil Powell wrote:

> Once again I have to go with my native "language", TCL:
> regexp {^a=([^\n]+)\n$} $stuff {} myExtractedStuff
> How can PHP do the same thing? I want to extract a specific pattern match from a body into another variable.  What does that in PHP, the manual does not make it clear to me?
> Thanx
> Phil

David Mintz
Email: See first!

Decibels of sound pressure employed by a new "thermoacoustic" refrigerator: 190
Decibels of sound pressure sufficient to ignite a person's hair: 165

	-- Harper's Index, February 2003

More information about the talk mailing list