diff options
author | fcolin | 2007-02-01 09:54:38 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:54:38 +0000 |
commit | 2a8d06db7f7764a8d5e62daaff1226576107c44b (patch) | |
tree | cb68864e8d38c08fee28f1b652a0e026f31e1824 /CSharp | |
parent | 22ace65033487a05b0518152b14e24de6934cc44 (diff) | |
download | ivy-csharp-2a8d06db7f7764a8d5e62daaff1226576107c44b.zip ivy-csharp-2a8d06db7f7764a8d5e62daaff1226576107c44b.tar.gz ivy-csharp-2a8d06db7f7764a8d5e62daaff1226576107c44b.tar.bz2 ivy-csharp-2a8d06db7f7764a8d5e62daaff1226576107c44b.tar.xz |
Utilisateur : Fcolin Date : 3/02/04 Heure : 13:59 Archivé dans $/EScribe/Ivy Commentaire: (vss 21)
Diffstat (limited to 'CSharp')
-rw-r--r-- | CSharp/Ivy/IvyPPC/Ivy.cs | 11 |
1 files changed, 9 insertions, 2 deletions
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;
/// <summary> The Main bus Class
/// </summary>
@@ -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, @"^\^(?<token>[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;
}
}
|