<?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 expressions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516398#M1934014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have to validate the URLs within the brackets.&lt;/P&gt;&lt;P&gt;Your REGEX works fine for the first and second scenario, however it doesn't match URLs that span over multiple lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2016 05:35:27 GMT</pubDate>
    <dc:creator>pranaydubey</dc:creator>
    <dc:date>2016-02-03T05:35:27Z</dc:date>
    <item>
      <title>Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516388#M1934004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with regular expressions and I am looking for some help.&lt;/P&gt;&lt;P&gt;All the URLs are enclosed within "[[" and "]]".&lt;/P&gt;&lt;P&gt;I am able to read the URL if a single URL occurs in a line.&lt;/P&gt;&lt;P&gt;However I get an undesirable result when there is more than one URL in the same line or when a single URL spans over multiple lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/879337" width="450" /&gt;&lt;/P&gt;&lt;P&gt;As you can see from the image the 2nd line includes "and".&amp;nbsp; I must get 2 URLs from this line instead one 1.&lt;/P&gt;&lt;P&gt;The URL in the 4th line spans over multiple lines and is not read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the right REGEX for the desirable result?&lt;/P&gt;&lt;P&gt;Any help/suggestion is welcome.&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" src="https://community.sap.com/74/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 13:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516388#M1934004</guid>
      <dc:creator>pranaydubey</dc:creator>
      <dc:date>2016-02-02T13:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516389#M1934005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;A href="http://www.regxlib.com/" title="http://www.regxlib.com/"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regular Expression Library&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/A&gt; Is your friend.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 14:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516389#M1934005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-02T14:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516390#M1934006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you want to find any character but "]]" after "[[".&lt;/P&gt;&lt;P&gt;You can use \[\[[a-z./:]*\]\].&lt;/P&gt;&lt;P&gt;Means search for [[ then for any character or dot or / or :.&lt;/P&gt;&lt;P&gt;Finally comes closing ]].&lt;/P&gt;&lt;P&gt;Line break may be something like \r\n.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/879486" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516390#M1934006</guid>
      <dc:creator>christian_lutter</dc:creator>
      <dc:date>2016-02-02T16:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516391#M1934007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there is at least one space between the ending brackets ]] and opening brackets [[ then you can use the following regular expression: \[\[[^\s]+\]\]&lt;/P&gt;&lt;P&gt;I don't know how to achieve the scenario where the text spans multiple lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/879481" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516391#M1934007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-02T16:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516392#M1934008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ironic this thread showed up for me today. I have been doing so many regular expressions lately, I think I have nightmares about them (ie. "solve this regular expression so you can go to sleep" kind! haha). I have almost memorized this page...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions" title="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOTS of regex generators out on the web too to help you.....and saved you from nightmares. &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516392#M1934008</guid>
      <dc:creator>ChrisSolomon</dc:creator>
      <dc:date>2016-02-02T16:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516393#M1934009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the one Christian mentioned but you need to expand the expression.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For eg: if the url contains numbers and Capital letters [[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.google.com/example9"&gt;https://www.google.com/example9&lt;/A&gt;&lt;SPAN&gt;]] then you should have one of the following&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;\[\[[a-zA-Z0-9./:]*\]\] (if you respect the case)&lt;/P&gt;&lt;P&gt;\[\[[a-z0-9./:]*\]\] (if you ignore the case) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516393#M1934009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-02T16:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516394#M1934010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this: &lt;A href="http://www.regexr.com/" title="http://www.regexr.com/#"&gt;http://www.regexr.com/#&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.regexpal.com/" title="http://www.regexpal.com/"&gt;Regex Tester - Javascript, PCRE, PHP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In my favourites.&lt;/P&gt;&lt;P&gt;Another good source is&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.regular-expressions.info/" title="http://www.regular-expressions.info/"&gt;Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516394#M1934010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-02T16:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516395#M1934011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on how you want to vallidate the url:&lt;/P&gt;&lt;P&gt;If you want to catch only the characters between the brackets and not validate them, I would recommend the regex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \[\[&lt;STRONG&gt;[^\]]+&lt;/STRONG&gt;\]\] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[^\]]+ is a sequence of any characters except the ]. If you parenthise this string you can get all desired results into a internal table for example with: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;A href="http://help.sap.com/abapdocu_70/en/ABAPFIND.htm"&gt;&lt;SPAN style="color: #005066; font-weight: bold;"&gt;FIND&lt;/SPAN&gt;&lt;/A&gt; &lt;SPAN style="color: #500066; font-weight: bold;"&gt;ALL&lt;/SPAN&gt; OCCURRENCES &lt;SPAN style="color: #500066; font-weight: bold;"&gt;OF&lt;/SPAN&gt; &lt;SPAN style="color: #500066; font-weight: bold;"&gt;REGEX&lt;/SPAN&gt; &lt;SPAN style="color: #4da619;"&gt;'\[\[(&lt;STRONG&gt;[^\]]+)&lt;/STRONG&gt;\]\]'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN style="color: #500066; font-weight: bold;"&gt;IN&lt;/SPAN&gt; 'your string with the [[url]]'&lt;BR /&gt;&amp;nbsp; &lt;SPAN style="color: #500066; font-weight: bold;"&gt;RESULTS&lt;/SPAN&gt; lt_result&lt;SPAN style="color: #808080;"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, Andreas &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/879616" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 21:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516395#M1934011</guid>
      <dc:creator>former_member183045</dc:creator>
      <dc:date>2016-02-02T21:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516396#M1934012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your timely reply.&lt;/P&gt;&lt;P&gt;Your REGEX works fine when for the 2nd line.&lt;BR /&gt;I assumed it had to do something with the greediness of the REGEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when the URL spans over multiple lines it still doesn't match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 05:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516396#M1934012</guid>
      <dc:creator>pranaydubey</dc:creator>
      <dc:date>2016-02-03T05:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516397#M1934013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, there is a possibility that the URL is entered after a space.&lt;/P&gt;&lt;P&gt;And I am ignoring the case, so Christian's REGEX should work fine.&lt;BR /&gt;Thanks for pointing that out!&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I still haven't found anything on URL spanning over multiple lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 05:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516397#M1934013</guid>
      <dc:creator>pranaydubey</dc:creator>
      <dc:date>2016-02-03T05:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516398#M1934014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have to validate the URLs within the brackets.&lt;/P&gt;&lt;P&gt;Your REGEX works fine for the first and second scenario, however it doesn't match URLs that span over multiple lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 05:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516398#M1934014</guid>
      <dc:creator>pranaydubey</dc:creator>
      <dc:date>2016-02-03T05:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516399#M1934015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the helpful links.&amp;nbsp; &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm just starting with Regular Expressions and I hope going through these links will help me avoid the nightmares.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Pranay D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 05:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516399#M1934015</guid>
      <dc:creator>pranaydubey</dc:creator>
      <dc:date>2016-02-03T05:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516400#M1934016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate multiple lines to one string ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 06:07:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516400#M1934016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-03T06:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expressions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516401#M1934017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While we use regex in ABAP, I don't think this is the best place to ask questions about forming regex. I suggest stack overflow or the like as a better place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, there's plenty of information in this thread now, so I think it should be closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regular-expressions/m-p/11516401#M1934017</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-02-03T07:09:43Z</dc:date>
    </item>
  </channel>
</rss>

