Skip to Content
0

REGEX pattern problem

Oct 10, 2017 at 05:06 PM

52

avatar image
Former Member

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 ''.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Nic Teunckens Oct 10, 2017 at 05:43 PM
2

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 ''.
Share
10 |10000 characters needed characters left characters exceeded