<?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: Regular expression confusion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760930#M642719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do it this way &lt;/P&gt;&lt;P&gt; IF p_input cp p_regex..&lt;/P&gt;&lt;P&gt;      WRITE:/ p_regex, ' found in ', p_input.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      WRITE:/ p_regex , ' not found'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2007 18:16:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-29T18:16:56Z</dc:date>
    <item>
      <title>Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760929#M642718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all, &lt;/P&gt;&lt;P&gt;I'm a long time unix geek who's trying to make sense of regular expressions in ABAP.  Look at this little program. If I run it as shown, it's successful. &lt;/P&gt;&lt;P&gt;If I use "G&lt;STRONG&gt;zz&lt;/STRONG&gt;xx" , it's not. &lt;/P&gt;&lt;P&gt;Can anyone explain this. That would be a perfectly valid string in any other tool I've used that supports regular expressions, whether that be a unix shell, perl, awk, or ruby. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zebj_hack5.
PARAMETERS:
  p_input TYPE string DEFAULT 'xxxxGGGGzzzzxxxxGGGGzzzz' LOWER CASE,
  p_regex TYPE string DEFAULT 'Gz' LOWER CASE,
  p_all as checkbox.

START-OF-SELECTION.
  FIND FIRST OCCURRENCE OF p_regex IN p_input.
    IF sy-subrc = 0 .
      WRITE:/ p_regex, ' found in ', p_input.
    ELSE.
      WRITE:/ p_regex , ' not found'.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760929#M642718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760930#M642719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do it this way &lt;/P&gt;&lt;P&gt; IF p_input cp p_regex..&lt;/P&gt;&lt;P&gt;      WRITE:/ p_regex, ' found in ', p_input.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      WRITE:/ p_regex , ' not found'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760930#M642719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T18:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760931#M642720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well RegEx is a little differnt in ABAP than what you are showing there.  See this doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f9cd701-0b01-0010-87b8-f86f9b7b823f" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f9cd701-0b01-0010-87b8-f86f9b7b823f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/42/9d6ceabb211d73e10000000a1553f6/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/42/9d6ceabb211d73e10000000a1553f6/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:24:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760931#M642720</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-29T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760932#M642721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Mahesh. But, that's not an example of regular expression matching. That's the older "contains pattern" technique.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;regular expression "G&lt;SPAN __jive_macro_name="2"&gt;&lt;/SPAN&gt;.&lt;STRONG&gt;zx.&lt;/STRONG&gt;G&lt;SPAN __jive_macro_name="4"&gt;&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;would match the p_input string from the first G to the last G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760932#M642721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T18:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760933#M642722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Rich.&lt;/P&gt;&lt;P&gt;I've tried the latter link from the help.sap.com, but it's quite confusing. &lt;/P&gt;&lt;P&gt;I guess I'll just try harder. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW. I bought your new book. Very nice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760933#M642722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T18:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression confusion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760934#M642723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your support Ed.  Hope it is helping.  RegEx is not specific to ABAP, it is widely used in other languages, but just recently brought to the ABAP stack, so there's not much out there in that regard, and yes I found it very confusing too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://en.wikipedia.org/wiki/Regular_expression" target="test_blank"&gt;http://en.wikipedia.org/wiki/Regular_expression&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 18:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expression-confusion/m-p/2760934#M642723</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-29T18:44:20Z</dc:date>
    </item>
  </channel>
</rss>

