Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't know what Velocimacro is (judging from the other answer I guess "addButton" will appear on its own line?), but the sure-fire way of finding the word "addButton" that is not preceeded by <code>#</code> is the following:</p> <pre><code>/(?&lt;!#)\baddButton\b/ </code></pre> <p>It will:</p> <ol> <li><code>(?&lt;!#)</code> <a href="http://www.regular-expressions.info/lookaround.html" rel="noreferrer">(?)</a> <ul> <li>Make sure that the current position is not preceeded by a <code>#</code> (hash mark)</li> </ul></li> <li><code>\b</code> <a href="http://www.regular-expressions.info/wordboundaries.html" rel="noreferrer">(?)</a> <ul> <li>Make sure that the current position is a word boundary (in this case it makes sure that the previous character is not a word character and that the next character is)</li> </ul></li> <li><code>addButton</code> <a href="http://www.regular-expressions.info/characters.html" rel="noreferrer">(?)</a> <ul> <li>Match "addButton"</li> </ul></li> <li><code>\b</code> <a href="http://www.regular-expressions.info/wordboundaries.html" rel="noreferrer">(?)</a> <ul> <li>Make sure that there is a word boundary at the current position. This avoids matching things like "addButtonNew" (because there is no word boundary between "addButton" and "New")</li> </ul></li> </ol> <p>A difference with this regular expression and the other is that this one will not consume the character before "addButton".</p> <p>A good resource for learning about regular expressions is <a href="http://www.regular-expressions.info/" rel="noreferrer">regular-expressions.info</a>. Click the (?) link in the list above for a link to the relevant page for that part of the regex.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload