mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
Improve numbers pattern matching and include roman numerals
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user