string strAddFirst = "3000'00d-31d";
How to use Regular Expression to break the string
Expected Output:
3000
00d
31d
Break string Using Regular Expressions
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 18, 2014, 3:31 AM EDT
hi,
try
string input = @"3000'00d-31d";
string pattern = @"(')|(-)";
foreach (string result in Regex.Split(input, pattern))
{
Console.WriteLine("'{0}'", result);
}
hope this will help you.
VulpesRank #55 · 29.2K reputationPosted Mar 18, 2014, 3:47 AM EDT
Try this instead: