Jump to content

microtronx

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. microtronx

    Delphi Rio and tRegEx.Replace Problem

    I've tried it today but with normal copy&paste of text the false offset in tMatch is not there, it is working. Only getting the text from tmyquery.fieldbyname('myclobfield').asstring forces the false offset in tRegEx. I think it has something todo with the encoding of the text from am CLOB (UNI) field in ElevateDB. Possible that we've searched for problem in tRegEx but it is in combination with ElevateDB. We're searching further. If we get a hit we'll post it here...
  2. microtronx

    Delphi Rio and tRegEx.Replace Problem

    But that code works perfect with 10.2.3. In my_RegExReplace i do result:=match.value and only if i have to replace something special i change result to whatever i need, this is ok, AFAIK.
  3. microtronx

    Delphi Rio and tRegEx.Replace Problem

    Hi pyscripter, don't have time and ressources at the moment to create a demo from our code. We have switched back to Tokyo 10.2.3 and everything works again. If i have time next week, i will create a demo showing the problem in Rio. It seems that tRegEx is not working same as in tokyo!
  4. Hi All, does someone have also problems with Delphi Rio and tRegEx.Replace, it is the same as in following Rsp: https://quality.embarcadero.com/browse/RSP-19902 I have installed all available patches and missing files for Rio but this problem still exists. Possible my Error and i don't see it? Same source works perfect with Delphi Tokyo 10.2.3: function my_RegExReplace(const Match: TMatch): string; var vbasic, vfunktion, vwert:string; vp1, vp2, vp3:string; i:integer; begin result:=match.value; if match.value='' then exit; vfunktion:=copy(match.value,1,pos('(',match.value)-1); vwert:=copy(match.value, pos('(', match.value)+1, length(match.value)); vwert:=copy(vwert,1,length(vwert)-1); if ansisametext(vfunktion, '.ResponseInfo.redirect') then result:='.ResponseInfo.redirect['+vwert+']'; end; function my_RegEx_run_Replace(vScript, vBasicList, vBasicSuffix:string):string; var vlist:tarray<string>; i:integer; vname:string; begin result:=vScript; try vlist:=vbasiclist.split([',']); for i:=0 to length(vlist)-1 do begin vname:=trim(vlist[i]); if vname<>'' then begin if pos(lowercase(vname), lowercase(vScript))>0 then begin vScript:=tRegEx.Replace(vScript, vname+vBasicSuffix, my_RegExReplace, [roIgnoreCase, roMultiLine]); end; end; end; result:=vScript; finally setlength(vlist,0); end; end; function my_replace(vsearch:string):string; begin // try something like this: vsearch :='xxx xxxxxx.Responseinfo.redirect(blablup); xxxxx'; result:=my_RegEx_run_Replace(vsearch, '.S,.I,.O,.ResponseInfo.redirect', '((([^\(\)][,\-*\/])(([^\(\)]))[,*\-\/]*)+)'); end;
×