Ad
Postgresql Invalid Class For [:^punct]
Having read the answer in the Remove all punctuation except apostrophes in R post, I tried to use
'[[:space:]]|[^\/[:^punct:]]'
in REGEXP_REPLACE function, but it gives me
[2201B] ERROR: invalid regular expression: invalid character class
How can I make it work?
Ad
Answer
The question you link to is tagged with r, where stringr
library uses ICU regex flavor that supports POSIX character classes in its own way, not necessarily POSIX compatible.
To match any whitespace or any punctuation but /
you may use
[^/[:alnum:]]
It matches any char that is not alphanumeric (and that means it is either a whitespace or punctuation) and not a /
char.
Ad
source: stackoverflow.com
Related Questions
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error
Ad