Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string txt = "rgb(139, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box";
- Regex r = new Regex("(rgb)+(\\(.*\\))");
- Match m = r.Match(txt);
- if (m.Success)
- {
- var word1 = m.Groups[1].ToString();
- var word2 = m.Groups[2].ToString();
- Console.Write(word1+ word2);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement