0

I've been trying to wrap my head around this. I need to find a sequence of characters (any number followed by a period), but only if they are outside of a set of curly braces.

With this I can find the characters in question:

\d+\.(\.\.)?

And with this, all characters within curly braces:

\{[^\}]*\}

And this link explains how find specific character strings outside of curly braces:

Regular Expression, match characters outside curly braces { }

in the form of:

(?:specificCharacterString)\s*([A-z0-9]*)\s*=\s*"(.*)"(?![^{]*\})

But I can't seem to figure out how to apply the "number followed by period" part of the condition to the previous expression.

If anyone could help me out here it would be appreciated.

Here's the result I'm looking for with the character sequences in question bold and italicized.

1. This is the first step {1. Or you could try this step} 2. Next step {2. Or try this step instead.}

jwBurnside
  • 849
  • 4
  • 31
  • 66

0 Answers0