diff --git a/EtchBendLines/BendLineExtractor.cs b/EtchBendLines/BendLineExtractor.cs
index 216d2ed..797f648 100644
--- a/EtchBendLines/BendLineExtractor.cs
+++ b/EtchBendLines/BendLineExtractor.cs
@@ -32,7 +32,10 @@ namespace EtchBendLines
///
/// The regular expression pattern the bend note must match
///
- static readonly Regex bendNoteRegex = new Regex(@"(?UP|DOWN|DN)\s*(?\d*(\.\d*)?)°\s*R\s*(?\d*(\.\d*)?)");
+ static readonly Regex bendNoteRegex = new Regex(
+ @"\b(?UP|DOWN|DN)\s+(?\d+(\.\d+)?)°?\s*R\s*(?\d+(\.\d+)?)\b",
+ RegexOptions.Compiled | RegexOptions.IgnoreCase
+ );
public DxfDocument DxfDocument { get; private set; }