w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to split a string in c# using regex.split method or any normal split method to get the output as below

You can use a regular expression that matches the start and end parentheses and everything between them:

string[] output =
  Regex.Matches(s, @"([^)]+)+")
  .Cast<Match>()
  .Select(x => x.Value)
  .ToArray();




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.