I am trying to convert these regular expressions from exalted text to one that I can use in vim: (?<![>\w\d])(42|45|21)\s(?!days)
I would like to compare 42, 45 and 21, where they do not immediately go by the word symbol, or by the number and are not accompanied by the word of the days.
As an example, I want to find 42 in this: This is a reference to chapter 42 in the book.
But not this: This is a reference to chapter <a href="#">42</a>.
Or that: This is a reference to chapter <a href="#">42 section 35</a>.
Or that: This book took 42 days to write.
I am new to regular expressions in general and super new to vim, so please forgive me if this is a wrong regular expression to start with.
Paige source
share