0

Trying to run sql : https://dbfiddle.uk/VlKz_7fg When I am running sql on fiddle its working fine, however when I am trying to run the same on my database it is throwing - ERROR: invalid regular expression: invalid character class

Can anyone please help how to resolve it..

2
  • 3
    Your fiddle uses ver 16 of the DB. If you lower it down you will get this error: dbfiddle.uk/iFUUelgr Check your version and what regex it supports. Commented Apr 5, 2024 at 18:53
  • @PM77-1 : Yes,its version 9.4.26.Can you pls help what do I need to change in regex to support this one? Commented Apr 5, 2024 at 19:07

1 Answer 1

-1

You use the following character classes:

  • alpha
  • word

In the listing of available classes for ver. 9.4 I see alpha but not word. See section 9.7.3.2. in https://www.postgresql.org/docs/9.4/functions-matching.html

[[:word:]]
Matches letters, numbers and underscores. Equivalent to \w or [a-zA-Z0-9_].

So replace [[:word:]] with \w.

See 9.4 based Fiddle

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.