Mad Libs: Difference between revisions

Line 633:
using System.Text.RegularExpressions;
 
namespace MadLibsMadLibs_RosettaCode
{
class Program
Line 683:
replacement = string.Empty;
// Guarantee we get a non-whitespace value for the replacement
}do
while(string.IsNullOrEmpty(replacement) || string.IsNullOrWhiteSpace(replacement))
{
Console.WriteLine("Enter value for: " + match.Value);
replacement = Console.ReadLine();
} while (string.IsNullOrEmpty(replacement) || string.IsNullOrWhiteSpace(replacement))
}
 
int location = sb.ToString().IndexOf(match.Value);