On 21 Feb 2010, at 9:44 AM, Kim Mosley wrote:

> Given the below code, I'd like to have reduce it to Slug,0,58,0,58
> which I will convert to .xls. So I want only the data from 5 fields
> (name, in, out, start, end), and I want to eliminate the field names
> and the other fields. If someone could send the pattern to my email:
> [email protected] it would be greatly appreciated.

I'll reply to the list, since mailing lists are for sharing solutions with the 
community, and not to provide free consulting services for individuals.

You don't say with of the three occurrences of "Slug" you mean to appear in the 
output, so I'll assume you mean the one in the <name> element. Also, I assume 
that the source file contains only <clipitem> elements. For anything more 
complicated than that, you'll have to write a script.

Search:
(?s)<clipitem.+?<name>([^<]+).+?<in>(\d+).+?<out>(\d+).+?<start>(\d+).+?<end>(\d+).+?</clipitem>

Replace:
\1,\2,\3,\4,\5\r

Beware that some mail systems wrap lines arbitrarily, so that 
close-angle-brackets might be wrapped to the beginning of a line, making the 
wrapped line appear to be a quotation.

        — F

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.

Reply via email to