<?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 How to find string with trailing space in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609947#M869531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to search a word instead of string from another string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried below code and expected that FIND will not search 'weeds' but it seems FIND ignores trailing spaces of string zstr and thus finds word 'weeds'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************&lt;/P&gt;&lt;P&gt;DATA: zstr type string value 'we ',&lt;/P&gt;&lt;P&gt;          lv_string type string value 'These are weeds',&lt;/P&gt;&lt;P&gt;          result_tab TYPE match_result_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND FIRST OCCURRENCE OF regex zstr IN lv_string&lt;/P&gt;&lt;P&gt;                      IGNORING CASE&lt;/P&gt;&lt;P&gt;                      RESULTS result_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;P&gt;Please consider that zstr is runtime variable with no fixed length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody has the solution, reply back fast !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sourabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2008 03:16:43 GMT</pubDate>
    <dc:creator>sourabh_chugh</dc:creator>
    <dc:date>2008-03-28T03:16:43Z</dc:date>
    <item>
      <title>How to find string with trailing space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609947#M869531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to search a word instead of string from another string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried below code and expected that FIND will not search 'weeds' but it seems FIND ignores trailing spaces of string zstr and thus finds word 'weeds'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************&lt;/P&gt;&lt;P&gt;DATA: zstr type string value 'we ',&lt;/P&gt;&lt;P&gt;          lv_string type string value 'These are weeds',&lt;/P&gt;&lt;P&gt;          result_tab TYPE match_result_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND FIRST OCCURRENCE OF regex zstr IN lv_string&lt;/P&gt;&lt;P&gt;                      IGNORING CASE&lt;/P&gt;&lt;P&gt;                      RESULTS result_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;P&gt;Please consider that zstr is runtime variable with no fixed length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody has the solution, reply back fast !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sourabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 03:16:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609947#M869531</guid>
      <dc:creator>sourabh_chugh</dc:creator>
      <dc:date>2008-03-28T03:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find string with trailing space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609948#M869532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out in this way ...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 if  lv_string cp zstr. 
   write : 'Success'.
 else.
  write : 'Failed'.
 endif.  

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 03:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609948#M869532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T03:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to find string with trailing space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609949#M869533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA STRING(30) VALUE 'This is a little sentence.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'Searched', 'SY-SUBRC', 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;ULINE /1(26).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 'X'.&lt;/P&gt;&lt;P&gt;WRITE: / 'X', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;               SY-FDPOS UNDER 'SY-FDPOS' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 'itt '.&lt;/P&gt;&lt;P&gt;WRITE: / 'itt   ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;                   SY-FDPOS UNDER 'SY-FDPOS' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR '.e .'.&lt;/P&gt;&lt;P&gt;WRITE: / '.e .', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR '*e'.&lt;/P&gt;&lt;P&gt;WRITE: / '*e ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 's*'.&lt;/P&gt;&lt;P&gt;WRITE: / 's* ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope it will solve your problem..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 03:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-find-string-with-trailing-space/m-p/3609949#M869533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T03:33:48Z</dc:date>
    </item>
  </channel>
</rss>

