public static void IsAscii(string input)
        {
            var regex   = new Blobby.Utils.Regex();
            var isAscii = regex.IsAscii(input);

            Assert.True(isAscii);
        }
Пример #2
0
        protected internal virtual bool DoesContainIdentifier(string identifier)
        {
            var regex   = new Blobby.Utils.Regex();
            var pattern = String.Format(@"\w{0}\w", identifier);

            return(regex.IsMatch(this.Line, pattern));
        }
Пример #3
0
        protected internal virtual decimal?GetPriceFromLine()
        {
            decimal?price = null;

            try
            {
                var          regex   = new Blobby.Utils.Regex();
                const string pattern = @"\w\d*\.\d*$";
                var          matches = regex.GetMatches(this.Line, pattern);
                price = decimal.Parse(matches.First());
            }
            catch (Exception exc)
            {
                Trace.TraceError(exc.ToString());
            }
            return(price);
        }
        protected internal virtual decimal? GetPriceFromLine()
        {
            decimal? price = null;
            try
            {
                var regex = new Blobby.Utils.Regex();
                const string pattern = @"\w\d*\.\d*$";
                var matches = regex.GetMatches(this.Line, pattern);
                price = decimal.Parse(matches.First());

            }
            catch (Exception exc)
            {
                Trace.TraceError(exc.ToString());
            }
            return price;
        }
 protected internal virtual bool DoesContainIdentifier(string identifier)
 {
     var regex = new Blobby.Utils.Regex();
     var pattern = String.Format(@"\w{0}\w", identifier);
     return regex.IsMatch(this.Line, pattern);
 }
 public static void IsAscii(string input)
 {
     var regex = new Blobby.Utils.Regex();
     var isAscii = regex.IsAscii(input);
     Assert.True(isAscii);
 }