Hi - non technical user here, proud to have figured out part of my goal.

I have multiple XML files that I am trying to scan through to pluck out 
instances of tag attributes. The XML looks like this, and I want to extract 
the NAME and LIKES  attributes across the files. 

<ANIMAL NAME="Fluffy" SPECIES="dog" LIKES="bones" AGE="6">

Using grep + extract I am able to produce this:

search = (?<=NAME=").*?(?=")|(?<=LIKES=").*?(?=")
output = 
Fluffy
bones
Tiger
chewtoys
Rusty
mailmen
            
I would love output that includes my own text:
Fluffy -- bones
Tiger -- chewtoys
Rusty -- mailmen

or at least has the output values in one line per XML tag
Fluffy bones
Tiger chewtoys
Rusty mailmen

I learned the pipe character lets me make multiple extractions but I am not 
able to control the output.

Can you help?

Thanking you...



-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/fb00b3e5-93d9-45f8-87b6-3e89a8433f15n%40googlegroups.com.

Reply via email to