<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REGEX help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175356#M1979391</link>
    <description>&lt;P&gt;Hey, but it's &lt;STRONG&gt;JSON &lt;/STRONG&gt;!&lt;/P&gt;&lt;P&gt;So, don't use Regex, parse the JSON.&lt;/P&gt;&lt;P&gt;See the many questions and answers in the forum.&lt;/P&gt;&lt;P&gt;EDIT: if you want to use a JSONpath in ABAP, sorry  it doesn't exist. If you want something close, you have to convert the JSON to XML (CALL TRANSFORMATION) and use:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;either XPath (method SET_EXPRESSION of CL_XSLT_PROCESSOR)&lt;/LI&gt;&lt;LI&gt;or a very simplified version of XPath named "iXML path", which allows to get the first element of a path, but it doesn't allow to get the Nth element, but if you reach an element via a path, you may then iterate children with iXML methods. For using iXML path, convert the XML into iXML with the function module SDIXML_XML_TO_DOM, then use the method FIND_FROM_PATH of IF_IXML_DOCUMENT.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 06 Feb 2020 13:05:11 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-02-06T13:05:11Z</dc:date>
    <item>
      <title>REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175353#M1979388</link>
      <description>&lt;P&gt;Hi, am new to REGEX. Can someone suggest REGEX for the below string. &lt;/P&gt;
  &lt;P&gt;{ "HHHH": { "@H1": "11111", "@H2": "22222", "AA": [ { "@A1": "A1A1", "A2A2": "A3A3" } , { "@A2": "A1A1", "A2A2": "A3A3" } } } ], "BB": [ { "@B1": "A1A1", "A2A2": "A3A3" } , { "@B2": "A1A1", "A2A2": "A3A3" } ], "CC": [ { "@C1": "A1A1", "A2A2": "A3A3" } , { "@C2": "A1A1", "A2A2": "A3A3" } ] } }&lt;/P&gt;
  &lt;P&gt;From the above, &lt;STRONG&gt;how can I pick only &lt;/STRONG&gt;&lt;STRONG&gt;"BB": [ { "@B1": "A1A1", "A2A2": "A3A3" } , { "@B2": "A1A1", "A2A2": "A3A3" } ]&lt;/STRONG&gt;, I have REGEX like below Find REGEX ' "BB": \{\W.*("CC") ' This is picking match like "BB": [ { "@B1": "A1A1", "A2A2": "A3A3" } , { "@B2": "A1A1", "A2A2": "A3A3" } ], &lt;EM&gt;"CC".&lt;/EM&gt; How can avoid the "&lt;EM&gt;&lt;STRONG&gt;CC"&lt;/STRONG&gt;&lt;/EM&gt;? &lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 10:03:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175353#M1979388</guid>
      <dc:creator>rajsg1202</dc:creator>
      <dc:date>2020-02-06T10:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175354#M1979389</link>
      <description>&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;as you are new to REGEX you may want to "play" with this SAP-provided program:&lt;/P&gt;&lt;P&gt;DEMO_REGEX_TOY&lt;/P&gt;&lt;P&gt;It explains the various REGEX options and lets you try things out.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bärbel&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 10:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175354#M1979389</guid>
      <dc:creator>BaerbelWinkler</dc:creator>
      <dc:date>2020-02-06T10:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175355#M1979390</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;rajsg1202&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;In addition to the above response, recommend you to go through below blog as well.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2015/02/03/regular-expression-in-abap/"&gt;REGEX&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 11:03:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175355#M1979390</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-02-06T11:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175356#M1979391</link>
      <description>&lt;P&gt;Hey, but it's &lt;STRONG&gt;JSON &lt;/STRONG&gt;!&lt;/P&gt;&lt;P&gt;So, don't use Regex, parse the JSON.&lt;/P&gt;&lt;P&gt;See the many questions and answers in the forum.&lt;/P&gt;&lt;P&gt;EDIT: if you want to use a JSONpath in ABAP, sorry  it doesn't exist. If you want something close, you have to convert the JSON to XML (CALL TRANSFORMATION) and use:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;either XPath (method SET_EXPRESSION of CL_XSLT_PROCESSOR)&lt;/LI&gt;&lt;LI&gt;or a very simplified version of XPath named "iXML path", which allows to get the first element of a path, but it doesn't allow to get the Nth element, but if you reach an element via a path, you may then iterate children with iXML methods. For using iXML path, convert the XML into iXML with the function module SDIXML_XML_TO_DOM, then use the method FIND_FROM_PATH of IF_IXML_DOCUMENT.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 06 Feb 2020 13:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175356#M1979391</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-02-06T13:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175357#M1979392</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Thanks. some of I am not timely alerts to check the answer.&lt;/P&gt;&lt;P&gt; My requirement is to pick up like jsonpath ( Ex: you may check in Jsonpath.com, $.phoneNumbers[:2]) . If I parse it to ABAP, further I have to pick up specific object and again parse the object to JSON (final output). Hence thought of using JSON Path.&lt;/P&gt;&lt;P&gt;Can you suggest if my approach is right?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 03:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175357#M1979392</guid>
      <dc:creator>rajsg1202</dc:creator>
      <dc:date>2020-02-07T03:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175358#M1979393</link>
      <description>&lt;P&gt;Hi Barbel,&lt;/P&gt;&lt;P&gt;Thanks, yes I tried and got this one "BB": \{\W.*("CC") ' . Still trying to find how can I avoid "CC" from the find mat&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 03:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-help/m-p/12175358#M1979393</guid>
      <dc:creator>rajsg1202</dc:creator>
      <dc:date>2020-02-07T03:50:50Z</dc:date>
    </item>
  </channel>
</rss>

