Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - using System;
- using System.Text.RegularExpressions;
- class Regexp
- {
- static void Main()
- {
- string pattern = @"((\(.*?\))|([^(]+))";
- Regex rgx = new Regex(pattern);
- string sentence = "(1+9)%6–(7%2)*8=";
- var result = rgx.Matches(sentence);
- }
- }
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment                    
                 
                    