Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Re: Using negation in Regular expression

$
0
0

While using regex, character negation can be done but not word negation.

Alternative would be to check value stored in substring like this.

DATA lv_substr TYPE string.

 

FIND REGEX '^ZBH_[A-Z]{2}_\w+_(.*)'

  IN 'ZBH_MM_CHECK_X'

  SUBMATCHES lv_substr .

IF sy-subrc EQ 0 AND lv_substr NE 'X'.

  "match

ENDIF.


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>