79573097

Date: 2025-04-14 12:06:10
Score: 1
Natty:
Report link

I searched for a long time, found nothing (nice code). Based on the experience, it reached regular expressions.

The task can be put on, I want to have only the necessary symbols in the string:

Below is a template (not fully working code) from a working project (Delphi 10.4)

uses
System.regularexpressions;
Function UpdateinFormorder (IDORDER: String): Integer;
Var
TEMP, Strregexp: String;
REGEX: TREGEX;
Begin
regex.create ('');
// What is allowed in the string utf English, Russian Code page, number and other
strregexp: = '[^A-Za-zА-Яа-я0-9 _ ,, ..?!-@<> "; ::; ()+=/\ |]';
// in TEMP we keep the string cut from extra characters
TEMP: = regex.Replace ('testing 😀', strregexp, '');
end;
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user30267562