<?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 cascade special characters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938204#M942316</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 am trying to &lt;/P&gt;&lt;P&gt;parse a string and escape (\) everything that's not a letter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can it be done ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User enters  w+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;His input ( through select-options )&lt;/P&gt;&lt;P&gt;w+ must be escaped as w\+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data lv_string(20) type c.
 
select-options s_input for lv_string.
 
 
DATA: moff TYPE i,
      mlen TYPE i,
      s type string.
 
translate s_input-low TO LOWER CASE.
 
 
FIND REGEX s_input-low IN 'xcdfedfrfv'
     MATCH OFFSET moff
     MATCH LENGTH mlen.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2008 09:38:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-30T09:38:40Z</dc:date>
    <item>
      <title>cascade special characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938204#M942316</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 am trying to &lt;/P&gt;&lt;P&gt;parse a string and escape (\) everything that's not a letter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can it be done ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User enters  w+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;His input ( through select-options )&lt;/P&gt;&lt;P&gt;w+ must be escaped as w\+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data lv_string(20) type c.
 
select-options s_input for lv_string.
 
 
DATA: moff TYPE i,
      mlen TYPE i,
      s type string.
 
translate s_input-low TO LOWER CASE.
 
 
FIND REGEX s_input-low IN 'xcdfedfrfv'
     MATCH OFFSET moff
     MATCH LENGTH mlen.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 09:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938204#M942316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T09:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: cascade special characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938205#M942317</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;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS:&lt;/P&gt;&lt;P&gt;  maxstrlen TYPE i VALUE 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER x(maxstrlen) LOWER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  off TYPE i,&lt;/P&gt;&lt;P&gt;  off_y TYPE i,&lt;/P&gt;&lt;P&gt;  len TYPE i,&lt;/P&gt;&lt;P&gt;  y LIKE x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = STRLEN( x ).&lt;/P&gt;&lt;P&gt;WHILE ( off &amp;lt; len ) AND ( off_y &amp;lt; maxstrlen ).&lt;/P&gt;&lt;P&gt;  IF NOT ( ( x&lt;EM&gt;off(1) &amp;gt;= 'a' AND x&lt;/EM&gt;off(1) &amp;lt;= 'z' ) OR&lt;/P&gt;&lt;P&gt;           ( x&lt;EM&gt;off(1) &amp;gt;= 'A' AND x&lt;/EM&gt;off(1) &amp;lt;= 'Z' ) ).&lt;/P&gt;&lt;P&gt;    y+off_y(1) = '\'.&lt;/P&gt;&lt;P&gt;    off_y = off_y + 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  IF off_y &amp;lt; maxstrlen.&lt;/P&gt;&lt;P&gt;    y&lt;EM&gt;off_y(1) = x&lt;/EM&gt;off(1).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  off = off + 1.&lt;/P&gt;&lt;P&gt;  off_y = off_y + 1.&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;x = y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Walter Habich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 09:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938205#M942317</guid>
      <dc:creator>former_member435013</dc:creator>
      <dc:date>2008-05-30T09:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: cascade special characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938206#M942318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lv_string(20) type c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;select-options s_input for lv_string.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: moff TYPE i,&lt;/P&gt;&lt;P&gt;      mlen TYPE i,&lt;/P&gt;&lt;P&gt;      s type string.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;translate s_input-low TO LOWER CASE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; replace all occurrences of 'w&lt;EM&gt;' in s_input-low with 'w/&lt;/EM&gt;' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 10:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938206#M942318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T10:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: cascade special characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938207#M942319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or have a look at CL_ABAP_REGEX and the parameter SIMPLE_REGEX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: regex TYPE REF TO cl_abap_regex,
      moff TYPE i,
      mlen TYPE i,
      text  TYPE        string.

text = 'xcdfedf+rfv'.

CREATE OBJECT regex
  EXPORTING
    pattern      = 'f+'
    simple_regex = 'X'.

FIND REGEX regex IN text
     MATCH OFFSET moff
     MATCH LENGTH mlen.

write: moff, mlen.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 10:02:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cascade-special-characters/m-p/3938207#M942319</guid>
      <dc:creator>karsten_korte</dc:creator>
      <dc:date>2008-05-30T10:02:54Z</dc:date>
    </item>
  </channel>
</rss>

