Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expressions question (lookahead)

Status
Not open for further replies.

ktucci

Programmer
Apr 23, 2001
146
US
i am trying to use this pattern but wish to not include the second portion of the pattern in the match...i tried using lookahead with no luck...does anyone have any ideas on how to best accomplish this

re.Pattern = "((\s+\d+\s+\w+\s+/\w+\b).*?)(\s+\d+\s+\w+\s+/\w+\b)"


thanks

keith
 
try "((\s+\d+\s+\w+\s+/\w+\b).*?)(?:\s+\d+\s+\w+\s+/\w+\b)"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top