Created
January 2, 2019 08:41
-
-
Save jskeet/8879cf9aee5177baad8d235341027331 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text.RegularExpressions; | |
class Test | |
{ | |
static void Main() | |
{ | |
string text = @"A Foobar is cool stuff, as we can see in Figure 1.1: | |
Figure 1.1 This is a Foobar"; | |
text = Regex.Replace(text, "^ +(Figure.*)$", "##### _$1_", RegexOptions.Multiline); | |
Console.WriteLine($"'{text}'"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment