2023 Apr 11 7:42 AM
Hello, as I am no expert in regex I want to check in the below string
UA/2023/0838.L
from 3 to 8 we have /20??/. Can anyone suggest a solution with regex?
Thanks
Elias
2023 Apr 11 8:21 AM
I don't know why you want to use a regular expression, it's not worth, if you use POSIX it will be very slow (and even PCRE will be slower than a classic IF condition).
Anyway, just to answer your question.
../20../.*
. is a wildcard character representing any character
* is a wildcard character indicating that the previous character (or element) may occur 0 or any number.
Look at ABAP documentation, it's described exactly the same.
2023 Apr 12 3:23 PM
Elias,
if you like to "play" with REGEX, the standard and well-documented program DEMO_REGEX_TOY should help.
Cheers
Bärbel