| 
	
 | 
 Posted by Paul on 11/03/05 19:47 
Hi, 
 
Does anyone know if it's possible to use regular expressions to grab 
all content between two words.  For example.... 
 
------ 
This is some example text to illustrate my problem and here's another 
my for you. 
------ 
 
I want to grab all text between the words 'some' and 'my' with the 
correct result being ' example text to illustrate ' 
 
The following doesn't work with either ereg or preg_match... 
 
some([^(my)]+)my 
 
Anyone got any ideas?  Is this even possible with regular expressions? 
 
Thanks in advance, 
 
Paul Maunders 
www.fubra.com
 
  
Navigation:
[Reply to this message] 
 |