<?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 like in SQL WHERE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077998#M1179456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is something like this what you're looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_table,
 line(80) TYPE c.
TYPES: END OF ty_table.

DATA:
  l_t_table      TYPE TABLE OF ty_table,
  l_s_table      TYPE  ty_table,
  l_v_regex(80)  TYPE c VALUE 'impl(?:.+)run(?:.+)'.


l_s_table-line = 'Implementations and running times'.
APPEND l_s_table TO l_t_table.
l_s_table-line = 'implementation language'.
APPEND l_s_table TO l_t_table.


LOOP AT l_t_table INTO l_s_table.
  FIND FIRST OCCURRENCE OF REGEX l_v_regex IN l_s_table-line IGNORING CASE.
  IF sy-subrc = 0.
    WRITE:/ l_s_table-line.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2009 16:34:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-27T16:34:58Z</dc:date>
    <item>
      <title>RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077997#M1179455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I want to search in internal tables lines like I do this in where expression of sql, but thought the instrumentality of RegEx.&lt;/P&gt;&lt;P&gt;For example, internal table have 2 lines:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Implementations and running times&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;implementation language&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I want to find like in SQL such string '&lt;STRONG&gt;impl&lt;/STRONG&gt;run*'&lt;/P&gt;&lt;P&gt;How can I do that in RegEx?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 15:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077997#M1179455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T15:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077998#M1179456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is something like this what you're looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_table,
 line(80) TYPE c.
TYPES: END OF ty_table.

DATA:
  l_t_table      TYPE TABLE OF ty_table,
  l_s_table      TYPE  ty_table,
  l_v_regex(80)  TYPE c VALUE 'impl(?:.+)run(?:.+)'.


l_s_table-line = 'Implementations and running times'.
APPEND l_s_table TO l_t_table.
l_s_table-line = 'implementation language'.
APPEND l_s_table TO l_t_table.


LOOP AT l_t_table INTO l_s_table.
  FIND FIRST OCCURRENCE OF REGEX l_v_regex IN l_s_table-line IGNORING CASE.
  IF sy-subrc = 0.
    WRITE:/ l_s_table-line.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 16:34:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077998#M1179456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077999#M1179457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Jerry Coleman&lt;/STRONG&gt;, Yes, that is! Great!&lt;/P&gt;&lt;P&gt;I know that:&lt;/P&gt;&lt;P&gt;"." - any symbol&lt;/P&gt;&lt;P&gt;"+" - 1 or more times&lt;/P&gt;&lt;P&gt;But what mean "(?:.+)" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 16:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5077999#M1179457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T16:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078000#M1179458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(?:.+)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two parts to this:  The *&lt;STRONG&gt;.+&lt;/STRONG&gt;* means as you expect.  I put parentheses around it for readability.  Since I put parentheses, this causes what's matched in the regular expression to be captured in a group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't want it captured, so I use &lt;STRONG&gt;?:&lt;/STRONG&gt; to suppress the capture.  This is for performance only.  You could write it as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;impl(.+)run(.+)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 17:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078000#M1179458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078001#M1179459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Jerry Coleman&lt;/STRONG&gt;, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 17:07:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078001#M1179459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T17:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078002#M1179460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: p_regex(80)  TYPE c VALUE 'impl(.+)run(.+)'.

data: regex         type ref to cl_abap_regex,
      matcher       type ref to cl_abap_matcher,
      ls_result     type match_result,
      lt_result     type match_result_tab.

condense p_regex.
    create object regex
      exporting
        pattern     = p_regex
        ignore_case = ''.

* For REGEX match
    matcher = cl_abap_matcher=&amp;gt;create(
                   pattern     = p_regex
                   ignore_case = ' '
                   table       = i_temp ). " i_temp is your internal table contains records

lt_result = matcher-&amp;gt;find_all( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 17:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078002#M1179460</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-01-27T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078003#M1179461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try with also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
impl(.*)run(.*)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 17:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078003#M1179461</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-01-27T17:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx like in SQL WHERE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078004#M1179462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All details of how work regular expressions can be found in [sap library - regular expressions|http://help.sap.com/abapdocu/en/ABENREGEX_SYNTAX.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 20:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regex-like-in-sql-where/m-p/5078004#M1179462</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-01-27T20:52:59Z</dc:date>
    </item>
  </channel>
</rss>

