<?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 Get substring after a certain pattern in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969760#M1339059</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 have a long string of characters (plain HTML codes in one long line) and would like to obtain a substring after a pattern. For example, part of the long string looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...abcdefg123456789...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to obtain "123456789" from this long line. And I am certain the previous substring, i.e. abcdefg, is unique in this long string line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about achieving this with ABAP code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jay Yang on Aug 4, 2009 1:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2009 20:03:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-04T20:03:13Z</dc:date>
    <item>
      <title>Get substring after a certain pattern</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969760#M1339059</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 have a long string of characters (plain HTML codes in one long line) and would like to obtain a substring after a pattern. For example, part of the long string looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...abcdefg123456789...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to obtain "123456789" from this long line. And I am certain the previous substring, i.e. abcdefg, is unique in this long string line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about achieving this with ABAP code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jay Yang on Aug 4, 2009 1:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 20:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969760#M1339059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T20:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get substring after a certain pattern</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969761#M1339060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use class CL_CRM_HTML_PARSER and use method PARSE_HTML_STRING&lt;/P&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, 04 Aug 2009 20:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969761#M1339060</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-04T20:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get substring after a certain pattern</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969762#M1339061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a@s. That's a great hint! However, when I tried with method parse_html_string by passing in the long html string I have, it didn't get me the result properly. I located the part/tag I wanted from the returned part table (a SPAN tag), but the attribute simply listed the SPAN id, instead of the value between SPAN and /SPAN. Could you provide me with further hint?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 20:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969762#M1339061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T20:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get substring after a certain pattern</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969763#M1339062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per earlier reply you mentioned abcdefg is unique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then try something simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zars
  no standard page heading line-size 255.

data : ser type string value 'testing1234abcdefg123456789'.
data : pos type i.

search ser for 'abcdefg'.
pos = sy-fdpos + 7.
write ser+pos(9).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will it do ?&lt;/P&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, 04 Aug 2009 20:45:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969763#M1339062</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-08-04T20:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get substring after a certain pattern</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969764#M1339063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YES! That does the trick! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 20:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-substring-after-a-certain-pattern/m-p/5969764#M1339063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T20:51:28Z</dc:date>
    </item>
  </channel>
</rss>

