Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1119 (new defect)

Opened 3 months ago

Last modified 2 months ago

Regex compilation takes ages, and the following example seems to hang

Reported by: rmt Assigned to: jascha
Priority: major Milestone: 0.99.8
Component: Core Functionality Version: 0.99.6 Jeff
Keywords: regex triage Cc:

Description

import tango.text.Regex; import tango.io.Stdout;

void main() {
  auto r = new Regex(`\<a href="([^">]+(jpg|jpeg))"\>[^<]*\<img[^>]+src="[^>]+\.(gif|jpg|png)"[^>]*>[^<]*\</a\>`, "I");
  Stdout("Regex Compiled.. Now attempting to match...").newline;
  if(r.test(`<a href="large.jpg"><img src="thumbnail.jpg" width="120" height="160" border="2" /></a>`)) {
    Stdout("Match.").newline;
  } else {
    Stdout("No Match.").newline;
  }
}

Change History

05/25/08 15:38:46 changed by rmt

  • owner changed from sean to jascha.

05/25/08 15:45:24 changed by larsivi

  • keywords set to regex triage.

07/10/08 06:58:34 changed by larsivi

  • milestone changed from 0.99.7 to 0.99.8.