I have asked this before directly to Simon, but the answer has disappeared in Cyberspace. Probably it is better to post it here in the interest of the general public. My problem is the following. I have an input file like:
References:
Author1, title1.
Author2, title2.
...
Author_n, title_n.
<empty line>
This needs to be tagged in XML like
<reference>Author1, title1.</reference>
<reference>Author2, title2.</reference>
<reference>...reference>
<reference>Author_n, title_n.</reference>
How do I grasp this repetition of lines in a regular expression if I do not know beforehand how many lines I may expect after the first line with 'References:' Or do I need to write some VB?
thanks
Pieter Zanstra
XML tags for multiple lines
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2229
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Hi Pieter,
Try EasyPattern
[ capture(csvfield), ',' , capture(csvfield) ]
Replace with
<reference>$1, $2</reference>
Or just add a new left/right margin.
Try EasyPattern
[ capture(csvfield), ',' , capture(csvfield) ]
Replace with
<reference>$1, $2</reference>
Or just add a new left/right margin.
Regards,
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads
Simon Carter, https://www.DataMystic.com
https://www.JadeDiabetes.com - Insulin dose calculator for Type 1 diabetes
https://www.DownloadPipe.com - 250,000 free software downloads