03-05-2013 4:38 AM
Hi ,
I am facing issue in getting the submatch value populated when I am using the below syntax
FIND REGEX '/REMI/.*/EREF/ IN 'hi 1234 /REMI/ asfcgcf 56789 /EREF/
RESPECTING CASE
MATCH OFFSET lv_offset
MATCH length lv_length
submatches cv_sub1.
My requirement is to get the text between /REMi/ and /EREF/. The patten which I gave is returning sy-subrc as 0 but
cv_sub1 which is submatch is blank.
Please provide your solutions on this.
Thank you.
Regards,
Mahalakshmi.
03-05-2013 5:15 AM
You're forgetting to indicate that you want to capture that bit:
'/REMI/(.*)/EREF/'
Notice the opening and closing brackets ( and ) around .*
03-05-2013 5:31 AM
Hi Bulusu ,
Try this :
FIND REGEX '/REMI/(.*)/EREF/' IN 'hi 1234 /REMI/ asfcgcf 56789 /EREF/'
RESPECTING CASE
MATCH OFFSET lv_offset
MATCH length lv_length
submatches cv_sub1.