Insert a Regex Token to Match at a Certain Position

The Insert Token button on the Create panel makes it easy to insert the following regular expression tokens to match at a certain position. They’re called “anchors” because they essentially anchor the regular expression at the position they match. See the Insert Token help topic for more details on how to build up a regular expression via this menu.

RegexBuddy supports the following anchors. Most applications only support some of these, and there is quite a bit of variation in the syntax.

You can use \Awhatever\z to verify that a string consists of nothing but “whatever”.

You can use ^whatever$ to match “whatever” only if it can be found all by itself on a line. Use ^.*whatever.*$ to completely match any line that has “whatever” somewhere on it.

Put \G at the start of your regular expression if you only want to attempt it at one position, without going through the whole subject string.

Placing word boundaries before and after a word as in \bword\b or \<word\> is the regex equivalent of a “whole words only” search.

Insert anchors