Skip to Content
0
Former Member
May 30, 2008 at 09:38 AM

cascade special characters

17 Views

Hi,

I am trying to

parse a string and escape (\) everything that's not a letter.

How can it be done ?

e.g.

User enters w+

His input ( through select-options )

w+ must be escaped as w\+

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.