View Full Version : regex help
I'm totally stupid with regex. I just want to get the string that is between two words ... "bla" and "woha". How would I go about that?
missing-score
09-30-2005, 03:20 AM
If its always going to be those two words, try:
<?php
$word = preg_replace('/bla\s(.+?)\swoha/is', "$2", 'bla yaks woah');
?>
Hmmm ... I think the correct question is
just want to get the string that is between a character and a word ... "(" and "County". How would I go about that? I want to use something like ereg or ereg_replace.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.