Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble crafting regular expression.

 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having difficulty crafting a regular expression to suit my needs. I want a match that begins with a particular word and ends on the next occurance of that word (non - inclusive):

As I said the match should be non-inclusive so that the next call to find() would begin with the target word. Any thoughts?

Garrett
[ April 26, 2006: Message edited by: Garrett Rowe ]
 
Henry Wong
author
Marshal
Pie
Posts: 21003
77
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try...



Henry
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry, works perfectly. The reluctant quantifyer was the part I was missing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic