Modify

Opened 14 years ago

Last modified 6 years ago

#6848 new defect

RegEx aren't handled well

Reported by: dimitri.slavutsky@… Owned by: Richard Liao
Priority: normal Component: TracTicketValidatorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Hi! I'm having issue to define a proper regex to handle my description field with this plugin.

The Description field should look like this:


== GOALS ==
Some Goals could be written here.
They could have some enumerations:

  1. Number one
  2. Number two

...

  1. Number N

<end of goals>

Here could be some more text


after this block could be another block, or just empty.

I defined a regex and configured the plugin:

[components]
ticketvalidator.* = enabled

[ticketvalidator]
validates = description
description.rule = ^== '''GOALS''' ==[\n\r]*[.\r\n\s]*<end of goals>[\n\r]*[.\r\n]*
description.tip = Sections: Goals, Necessary input, Necessary output and Necessary resources have to exist.

If I am testing without any text in between the "Goals-Tags" it seems to be alright, as soon, as I am adding some text, I am getting my own tip: Sections: Goals, Necessary input, Necessary output and Necessary resources have to exist.

I tried to debug it and it seems, that re.py throughs Expected EOF Expression.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Ryan J Ollos

Description: modified (diff)
Keywords: RegEx re.py removed
Summary: RegEx aren't handeled wellRegEx aren't handled well

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Richard Liao.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.