Anonymous user
Mad Libs: Difference between revisions
→{{header|C sharp}}
Line 633:
using System.Text.RegularExpressions;
namespace
{
class Program
Line 683:
replacement = string.Empty;
// Guarantee we get a non-whitespace value for the replacement
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);
|