置換対象文字列をメソッドで渡す方法 `new Regex`()string string source ="<!DOCTYPE html><html lang~~~"; Regex reg = new Regex(" RegexOptions.IgnoreCase | RegexOptions.Singleline); Match match = reg.Match(source); if (match.Success) textBox8.Text = match.Groups[0].Value.Trim(); private void Tikan(string source, string tikan){ Regex reg = new Regex(tikan, RegexOptions.IgnoreCase | RegexOptions.Singleline); Match match = reg.Match(source); if (match.Success) textBox8.Text = match.Groups[0].Value.Trim(); } \d\d\d
`\d`
* 0 … `\d*`
* 1 … `\d+`
* _n_ _m_ … `\d{n,m}`
* _n_ … `\d{n,}`
* _m_ … `\d{,m}`
`\d``[]``()`
xcX3v84RxoQ-4GxG32940ukFUIEgYdPy
ea8645a05f22ff1ef1141db0939b4812
Stop