Capturing part of regex search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been looking at the regex functions. Either it's a lack of caffeine or
it's right in front of my nose, but how do I put part of a regex find into
a variable? Plus I suck at regex.

e.g.

I'm interested in capturing the names of people who are found in text
surrounded by the following format:

"John Doe":/cr/johndoe/ or "Jane Smith":/cr/janesmith/

I'd want to place John Doe or Jane Smith into the variable. The search will
always be for "name":/cr/nameurl/

What regex and php function would I use? Thanks for any pointers. One of
these days I'll master regex.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux