Skip to Content
avatar image
Former Member

REGEX pattern problem

Hello guys, I need to make validation on a variable that contains only letters, digits, space and dot. I use pattern like the one below, but I receive error

Regular expression '[^A-Za-z0-9-\s\.]' is invalid in character position 13 (\s)

Any hits will be wellcome

REPLACE ALL OCCURRENCES OF REGEX '[^A-Za-z0-9-\s\.]' IN lv_name1 WITH ''.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 10, 2017 at 05:43 PM

    You can test the RegEx in the SAP-prgr "DEMO_REGEX_TOY" ...

    You will find that your RegEx is invalid, but a (quick and possibly not all-couvering) solution could be :

    REPLACE ALL OCCURRENCES OF REGEX '[^a-zA-Z0-9\s\.].' IN lv_name1 WITH ''.
    Add comment
    10|10000 characters needed characters exceeded