--- C:\Documents and Settings\Micheal Jervis\Local Settings\Temp\TCVaacc.tmp\StringFunctions.1.12.cs	Fri Dec 08 11:55:27 2006
+++ C:\Temp\nant\src\NAnt.Core\Functions\StringFunctions.cs	Fri Dec 08 11:06:56 2006
@@ -23,6 +23,7 @@
 using System.Collections;
 using System.Reflection;
 using System.Globalization;
+using System.Text.RegularExpressions;
 
 using NAnt.Core;
 using NAnt.Core.Types;
@@ -485,6 +486,29 @@
         [Function("trim-end")]
         public static string TrimEnd(string s) {
             return s.TrimEnd();
+        }
+
+        /// <summary>
+        /// Tests whether the specified string matches the specified Regular
+        /// Expression.
+        /// </summary>
+        /// <param name="s1">test string</param>
+        /// <param name="s2">regular expression (string)</param>
+        /// <returns>
+        /// <see langword="true" /> when <paramref name="s1" /> contains one
+        /// or more matches with the supplied provided regular expression in
+        /// <paramref name="s1" />.
+        /// </returns>
+        /// <example>
+        /// <code>string::regex-matches('testing string', 'test.*') ==> true</code>
+        /// </example>
+        /// <example>
+        /// <code>string::regex-matches('super string', 'test.*') ==> false</code>
+        /// </example>
+        [Function("regex-matches")]
+        public static bool Regex(string s1, string s2) {
+						Regex r = new Regex(s2);
+            return r.IsMatch(s1);
         }
 
         #endregion Public Static Methods
