[yunqa.de] Access violation calling DIPerlRegEx.Match

  • From: Jim Bretti <jim@xxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 26 May 2010 20:22:23 -0400

Hi,

I'm getting an access violation from DIPerlRegEx.Match when using the following subject / match pattern:

Subject:
Das malerische Bild der Stadt ist durch sanfte Hügel geprägt. Sehr bekannt für Oxford sind auch seine Rudermannschaften, die
jedes Jahr gegen die von Cambridge auf der Themse ins Rennen gehen.

Match Pattern:
(?<=[\pL\pN\pP])\p{Zs}*\R\p{Zs}*(?=[\pL\pN\pP])

So the following code fails when memo1 and memo2 are loaded with the above subject and match pattern:

      RE :=  TDIPerlRegEx.Create(Self);
      RE.SetSubjectStr(Memo1.Text);
      RE.CompileMatchPattern(Trim(Memo2.Text));
      If RE.Match > 0 then

Seems like it might have something to do with umlauts in the subject (
ü, ä) together with the Zs property code in the match pattern.  Do I need to set any compile / match options for these characters in the subject string?

Sample project is attached.

Thanks
Jim



Other related posts: