Beispiel #1
0
            string GetGroup(JSRegExp regexp, int n)
            {
                var lastregex = regexp.LastDRegExp;

                if (lastregex != null)
                {
                    var groups = lastregex.MatchedGroups;
                    if (groups != null && groups.Count >= n)
                    {
                        return(groups[n].Value);
                    }
                }
                return(mdr.Runtime.Instance.DefaultDUndefined.GetTypeOf());
            }
Beispiel #2
0
 string GetGroup(JSRegExp regexp, int n)
 {
   var lastregex = regexp.LastDRegExp;
   if (lastregex != null)
   {
     var groups = lastregex.MatchedGroups;
     if (groups != null && groups.Count >= n)
       return groups[n].Value;
   }
   return mdr.Runtime.Instance.DefaultDUndefined.GetTypeOf();
 }