From 2a8d06db7f7764a8d5e62daaff1226576107c44b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:54:38 +0000 Subject: Utilisateur : Fcolin Date : 3/02/04 Heure : 13:59 Archivé dans $/EScribe/Ivy Commentaire: (vss 21) --- CSharp/Ivy/IvyPPC/Ivy.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CSharp/Ivy/IvyPPC') diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index cfec5cb..8775944 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -14,6 +14,7 @@ namespace IvyBus using System.Configuration; using System.Windows.Forms; using System.Globalization; + using System.Text.RegularExpressions; /// The Main bus Class /// @@ -593,12 +594,18 @@ namespace IvyBus internal bool CheckRegexp(String exp) { bool regexp_ok = true; + // TODO Bug + // ClockStop ClockStart & ^Clock(Start|Pause) + // should Stop to the first parent if ((sent_messageClasses != null) && exp.StartsWith("^") ) { regexp_ok = false; - foreach (string exp_class in sent_messageClasses) + // extract first word from regexp... + string token = Regex.Replace(exp, @"^\^(?[a-zA-Z_0-9-]+).*" , @"${token}"); + + foreach (string exp_class in sent_messageClasses) { - if ( exp.Substring(1).StartsWith(exp_class) ) + if ( exp_class.StartsWith(token) ) return true; } } -- cgit v1.1