Reputation: 2627
Can anyone explain to me why this regex select returns false in PostgreSQL:
select '354902050487064_Gismo3' ~* '\d{15}_\w+'
Tried it on several online regex testers and in matches fine.
Thanks
Upvotes: 0
Views: 71
Reputation: 91385
You have to escape the backslashes:
select '354902050487064_Gismo3' ~* '\\d{15}_\\w+'
Upvotes: 1