using System;
using System.Text.RegularExpressions;
namespace RegexTest
{
class Program
{
static void Main(string[] args)
{
string input = "CO < SUB > 1 </ SUB > 안녕 < SUB > 2 </ SUB > 하세요 < SUB > 3 </ SUB >";
Console.WriteLine(str(input));
}
public static string str(string input)
{
return Regex.Replace(input, @"<(.|\n)*?>", string.Empty);
}
}
}
[실행 결과]
'프로그래밍 > C# (.net)' 카테고리의 다른 글
[C# .Net] DataView to DataSet (0) | 2020.09.29 |
---|---|
[C# .Net] 텍스트파일 쓰기 / 읽기 (0) | 2020.09.28 |
[C# .Net] Kakao API - 카카오 번역 (0) | 2020.09.28 |
[C# .Net] Naver API - 파파고 번역 (0) | 2020.09.28 |
[C# .Net] Google API - 구글 번역 (0) | 2020.09.28 |