[Tutor] Text matching
Gardner, Dean
Dean.Gardner at barco.com
Thu May 3 14:01:43 CEST 2007
Hi Folks
I wish to isolate certain changelog entries and display them to the
user, for example:
Changelog.txt
----------Some Module <Tag> ----------
M 000751 - Title
> what was amended
Reviewed by: Someone
----------Some Module <Tag> ----------
A 000752 - Title
> what was amended
Reviewed by: Someone
----------Some Module <Tag> ----------
A 000751 - Title
> what was amended
Reviewed by: Someone
For this text file I wish to find all entries for 000751 and then
present each of the changelog entries.
My thought was to
identify the "----" with a regular expression
identifying this as the changelog start
attempt to find the item number
if it isn't found move on, if it is found then add this to a list.
But I feel as though there must be a simpler and more effecient way.
Thanks in advance
Dean Gardner
Test Engineer
Barco
Bonnington Bond, 2 Anderson Place, Edinburgh EH6 5NP, UK
Tel + 44 (0) 131 472 5731 Fax + 44 (0) 131 472 4799
www.barco.com
dean.gardner at barco.com
DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070503/e2b57b50/attachment.htm
More information about the Tutor
mailing list