1、 pinyinStr=pinyinStr.replace(/\[content\](.|\n)*(?=\[keywords\])/gi,"");匹配以[keywords]结尾,但不包括本身的内容
pinyinStr='[word]\r\n' +word_eval+ "\r\n" +pinyinStr.replace(/\[content\](.|\n)*(?=\[keywords\])/gi,"");
2、var re=/\breplace\s*:\s*.*\b/gi; \b自动识别边界(,、等)
3、
. 匹配除换行之外的任何单个字符。
(.|\n)*匹配所有字符
4、C#
string UrlReferrer = context.Request["VspUrlReferrer"].ToString();
Regex regex = new Regex(@"(?:http\:\/\/)(.*?)(?:\/)", RegexOptions.IgnoreCase);
string hostChrome = regex.Match(UrlReferrer).Groups[1].Value;
host = hostChrome;
浙公网安备 33010602011771号