@:21101001@+@:21101002@+@:21101003@+@:21101004@。我想截取@:与@之间的数字串,把四个数字串都截出来,该怎么做?
var s = '@:21101001@+@:21101002@+@:21101003@+@:21101004@'
var m = s.match(/\d+/g);
console.log(m)
百度有的是,知悉研究一下还是可以的
static void Main(string[] args)
{
string aa = "@:21101001@+@:21101002@+@:21101003@+@:21101004@";
var bb=aa.Replace("@+@:", "+");
Regex reg =new Regex(@"@:(.+)@");
Match m = reg.Match(bb);
string value = m.Groups[1].Value;
Console.Write(value);
}
static void Main(string[] args)
{
string aa = "@:21101001@+@:21101002@+@:21101003@+@:21101004@";
var bb=aa.Replace("@+@:", "+");
Regex reg =new Regex(@"@:(.+)@");
Match m = reg.Match(bb);
string value = m.Groups[1].Value;
Console.Write(value);
}