Thread
:
Regular Expression
View Single Post
#
5
(
permalink
)
03-28-08, 04:29 AM
UnrealEd
Community Liaison
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
ow, sorry, I thought the string was "cancer lung". Well then!
This should do:
Code:
(([a-zA-Z]+)(?:\sof)?\s(?=lung))
this will result in ('cancer of lung', 'cancer') or ('something lung', 'something')
__________________
"Good judgement comes from experience, and experience comes from bad judgement." -
Fred Brooks
LinkedIn
|
Coderzone.org
|
One hell of a Party
UnrealEd
View Public Profile
Visit UnrealEd's homepage!
Find all posts by UnrealEd