Hi,
Yes indeed, I've been trying to use preg_match for last few hours, but no results. Can't find the regex expression. Could you give details?
Thanks!
Search found 2 matches
- Sun Oct 28, 2007 4:13 pm
- Forum: PHP - Code
- Topic: Extract part of a string
- Replies: 4
- Views: 828
- Sun Oct 28, 2007 3:48 pm
- Forum: PHP - Code
- Topic: Extract part of a string
- Replies: 4
- Views: 828
Extract part of a string
Hi, I am looking for a code that can grab everything in between the brackets corresponding to a certain variable ($name). For example, if my string is $string = "John{ john is a brown worm } Laura{ nancy is a blue pig }"; and $name = "John", what I want returned is "john is ...