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

Ticket #1119 (closed defect: wontfix)

Opened 16 years ago

Last modified 13 years ago

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

Reported by: rmt Assigned to: larsivi
Priority: major Milestone: 1.0
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 19:38:46 changed by rmt

  • owner changed from sean to jascha.

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

  • keywords set to regex triage.

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

  • milestone changed from 0.99.7 to 0.99.8.

03/28/09 12:06:14 changed by larsivi

  • milestone changed from 0.99.8 to 0.99.9.

08/26/09 19:46:38 changed by larsivi

Compilation has a noticeable delay on my machine, maybe a quarter of a second, but the matching itself seems to hang.

Will have to investigate this later, but at least the attribute used is not implemented.

02/07/10 21:43:25 changed by larsivi

  • milestone changed from 0.99.9 to 1.0.

06/06/10 19:57:35 changed by kris

  • owner changed from jascha to larsivi.

08/04/11 01:21:07 changed by dhasenan

  • status changed from new to closed.
  • resolution set to wontfix.

Resolving in favor of #2071.