Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Miguel Perez
This formula did the trick. You are the best! 😊 El lunes, 24 de febrero de 2020, 12:08:24 (UTC-6), ThePorgie escribió: > > I would then include the line above so the string needs "Name" > \n\s+ > again with a \1 in the replace before hitting extract. > > Will that do what you need? > > > On Monday

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Miguel Perez
This could be an option too. Thank you. Excel ended up not working in this case because while it reads the file, it has a weird formatting too and I cannot work with it much better. The formula posted above works much better for me and is what I was looking for. El lunes, 24 de febrero de 2020,

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread GP
On Monday, February 24, 2020 at 9:54:43 AM UTC-8, Miguel Perez wrote: > > Thank you, ThePorgie. > > Unfortunately it doesn't work for me. > > I should've said that there are many values using this syntax, like this: > > > > > > > > > > > As you can see, there are two keys,

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread ThePorgie
One other thing about a xml tool. The latest version of Mac Excel will now open xml. Just an fyi if that would work to get the names you're looking for. On Monday, February 24, 2020 at 11:44:36 AM UTC-5, Miguel Perez wrote: > > Hi, > > I'm fairly new to RegEx and I need your help. > > I proces

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Sam Hathaway
Can you give us a real-world example? I’m not clear on whether “key1” and “key2” literally appear in your document or if they are placeholders. In any case, you should probably use a tool that is designed to work with XML. Such a tool would take care of the CDATA sections for you and let you

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread ThePorgie
I would then include the line above so the string needs "Name" \n\s+ > Thank you, ThePorgie. > > Unfortunately it doesn't work for me. > > I should've said that there are many values using this syntax, like this: > > > > > > > > > > > As you can see, there are two keys, but

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Miguel Perez
Thank you, ThePorgie. Unfortunately it doesn't work for me. I should've said that there are many values using this syntax, like this: As you can see, there are two keys, but the very next line says *value* for both of them. That is my main concern. I want *value1* for

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread ThePorgie
Put "\1" (no quotes) in the replace field and then Extract with > Hi, > > I'm fairly new to RegEx and I need your help. > > I process many XML files in my job. Most of them are formatted correctly, > that is: > Value > Value > > For those I search for values using: > > .*? > And it works like a c

Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Miguel Perez
Hi, I'm fairly new to RegEx and I need your help. I process many XML files in my job. Most of them are formatted correctly, that is: Value Value For those I search for values using: .*? And it works like a charm. But then I have this one source that formats its XML files with CDATA fields li