Improve numbers pattern matching and include roman numerals

This commit is contained in:
BobLd
2019-12-31 16:53:28 +00:00
committed by Eliot Jones
parent 07f51712c6
commit 39f275aaeb

View File

@@ -2,6 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using UglyToad.PdfPig.Content;
using UglyToad.PdfPig.Geometry;
@@ -18,7 +19,10 @@ namespace UglyToad.PdfPig.DocumentLayoutAnalysis
/// </summary>
public static class DecorationTextBlockClassifier
{
private static System.Text.RegularExpressions.Regex numbersPattern = new System.Text.RegularExpressions.Regex(@"\d"); // TODO: add roman numbers pattern
/// <summary>
///
/// </summary>
public static Regex numbersPattern = new Regex(@"(\d+)|(\b([MDCLXVI]+)\b)", RegexOptions.IgnoreCase);
private static string replacementChar = "@";
/// <summary>