Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Matching the string Pattern '/SMB*/'

Former Member
0 Likes
646

Hi Experts,

I want to match the pattern '/SMB/'. I tried using if lv_str CP '/SMB/' . But even-though lv_str variable has a string with same pattern, if condition is not getting executed. Please help.

Thanks in Advance.

Cheers

Vinod

4 REPLIES 4
Read only

Former Member
0 Likes
591

Hi Vinod.

CP compares the wholle string, maybe you have to look for

'/SMB/' or '/SMB/*'

Regards,

Klaus

Read only

matt
Active Contributor
0 Likes
591

Try composing a suitable REGular EXpression and use that. See keyword "FIND".

Read only

Former Member
0 Likes
591

Thanks for the help. I got it.

Read only

Clemenss
Active Contributor
0 Likes
591

Hi Vinod,

consider the use of REGEX option in FIND/REPLACE command. See the REGEX documentation.

Can you give any example for a string that should but does not match the pattern '/SMB*/' ?

Check the documentation [log_exp - Comparison Operators for Character-Like Data Types|http://help.sap.com/abapdocu_702/en/abenlogexp_strings.htm]. This may help.

Thanks and regards

Clemens Li