Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/19 08:45:53 (6 years ago)
Author:
chaider
Message:

#2971

  • Added possibilty to use variables with whitespaces or derivation in constraint-definitions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraintsParser.cs

    r16780 r16809  
    5858          var targetConstraint = trimmedLine.Substring(start, end-start);
    5959          var match = Regex.Match(targetConstraint,
    60             @"([^\s]*)\s*(\bin\b)\s*([\[\]])\s*(\S*)\s*(..)\s*(\S*)\s*([\[\]])");
     60            @"(.*)\s*(\bin\b)\s*([\[\]])\s*(\S*)\s*(..)\s*(\S*)\s*([\[\]])");
    6161          if (match.Success) {
    6262            if (match.Groups.Count != 8) {
     
    8888        } else if (trimmedLine.StartsWith("d") || trimmedLine.StartsWith("\u2202")) {
    8989          var match = Regex.Match(trimmedLine,
    90             @"([d∂])([²³])?\s*(\S*)\s*(\/)([d∂])\s*([^²³]*)([²³])?\s*\bin\b\s*([\[\]])\s*(\S*)\s*(..)\s*(\S*)\s*([\[\]])");
     90            @"([d∂])([²³])?\s*(.*)\s+(\/)\s+([d∂])\s*([^²³]*)([²³])?\s*\bin\b\s*([\[\]])\s*(\S*)\s*(..)\s*(\S*)\s*([\[\]])");
    9191
    9292          if (match.Success) {
     
    135135          continue;
    136136        } else {
    137           throw new ArgumentException("Error at your constraints definition constraints have to start with Target: | d | \u2202 | #");
     137          throw new ArgumentException("Error at your constraints definition constraints have to start with (Target: | d | \u2202 | #)");
    138138        }
    139139      }
Note: See TracChangeset for help on using the changeset viewer.