mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
fixed multiline regex
This commit is contained in:
@@ -30,7 +30,12 @@ public record LocalQuizQuestionAnswer
|
||||
}
|
||||
|
||||
string startingQuestionPattern = @"^(\*?[a-z]?\))|\[\s*\]|\[\*\]|\^ ";
|
||||
var text = Regex.Replace(input, startingQuestionPattern, string.Empty).Trim();
|
||||
|
||||
int replaceCount = 0;
|
||||
var text = Regex.Replace(input, startingQuestionPattern, (m) =>
|
||||
{
|
||||
return replaceCount++ == 0 ? "" : m.Value;
|
||||
}).Trim();
|
||||
return new LocalQuizQuestionAnswer()
|
||||
{
|
||||
Correct = isCorrect,
|
||||
|
||||
Reference in New Issue
Block a user