Hi Maik,
Maik Wojcieszak wrote 7 lines
I've tried some regex units implemented in pascal but they are
either not complete or buggy or slow.
The best I've found was PCRE which is kind of a standard in many
scripting languages.
I'm not sure if there is a lazarus wrapper but I'm using it with delphi.
http://www.renatomancuso.com/software/dpcre/dpcre.htmThis is what I've got.
It works, but it's a bit tacky!
i:=Pos('\U+',mPCharArray);
while i>0 do
begin
subS:=Copy(mPCharArray,i+3,4);
mainString:=mPCharArray;
Delete(mainString,i,7);
Insert(chr(Hex2Dec(subS)),mainString,i);
mPCharArray:=PChar(mainString);
i:=Pos('\U+',mPCharArray);
end;
I was hoping that someone could suggest something a little more elegant!