Can't compile regex expression.
Code:
#include <regex> What am I doing wrong ? UPD. the same proplem with "[\\x{D800}-\\x{DBFF}]" expression. |
Re: Can't compile regex expression.
How about you, idk, use the error params...
PHP Code:
|
Re: Can't compile regex expression.
Quote:
PHP Code:
sm exts list Regex (1.9.0.6241): Provides regex natives for plugins With PCRE_CASELESS flag: Regex: 0 | Error: character value in \x{...} sequence is too large | RegexError: 3 |
Re: Can't compile regex expression.
The root of your problem seems to be:
Quote:
|
Re: Can't compile regex expression.
Thanks, but I'm not sure what it gives me...
By the way, here this expression works as it should. From your answer I understood that most likely to do what I want using regex is not possible ? Perhaps there is an alternative option as find emoticons in the text and remove their ? |
Re: Can't compile regex expression.
Regex re = new Regex("[\\pSo]", PCRE_UTF8, error, sizeof(error), iError);
Seems to work here is a list of what it captures. https://www.fileformat.info/info/uni...ry/So/list.htm |
Re: Can't compile regex expression.
Unfortunately, this rule removes too many characters.
I am writing this regular expression to remove those characters from nicknames which do not properly send to the MySQL server. To avoid such errors: Incorrect string value: '\xF0\x9F\x98\x88 6...' for column 'name' at row 1 |
Re: Can't compile regex expression.
You should really consider switching to the utf8mb4 charset.
|
Re: Can't compile regex expression.
Then I'll have to rewrite all plugins and web interfaces to a different encoding...
And in general it is interesting why this rule does not work in sourcemod but it works on the regex101. |
Re: Can't compile regex expression.
No you won’t, the input/output is still UTF-8, it just allows characters outside of the BMP to be stored.
|
All times are GMT -4. The time now is 19:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.