C#
获得匹配数据
MatchCollection mc = Regex.Matches(_url, @"href=[""'']([sS]*?)[""'']", RegexOptions.Singleline | RegexOptions.Multiline | RegexOptions.Singleline); foreach (Match item in mc) _url = item.Groups[1].Value;
JS
替换
txt = txt.replace(/(^[s ]+)|([s ]+$)/g, '');