What are the keyword boundaries?

This answer explains what are the keyword boundaries selectable in the Left Boundary and Right Boundary fields available in the AIL menu of the Interlinks Manager plugin for WordPress.

Introduction

The Interlinks Manager plugin uses regular expressions implemented with the PCRE regex syntax to apply the automatic internal links and retrieve information on the website’s internal links structure.

With the keyword boundaries, you can selectively match occurrences of the keyword preceded or followed by a specific character or by specific regular expressions anchors.

Types of boundaries

Currently, Interlinks Manager allows the use of five different keyword boundaries.

GENERIC

This boundary matches transitions between word characters and non-word characters. When this boundary is selected, the regular expression makes use of the word boundary token.

For example, if you assign this boundary as the Left Boundary of the keyword “book”, the keyword will be matched by the regular expression in the following cases:

  • ” book”
  • “,book”
  • “-book”
  • “!book”

But not in the following cases:

  • “abook”
  • “àbook”
  • “èbook”

WHITE SPACE

This boundary matches occurrences of the keyword preceded or followed by a white space character.

For example, if you select this boundary as the Left Boundary of the keyword “book”, the keyword will be matched by the regular expression in the following cases:

  • ” book”

But not in the following cases:

  • “abook”
  • “,book”
  • “.book”

COMMA

This boundary matches occurrences of the keyword preceded or followed by the comma character.

For example, if you select this boundary as the Left Boundary of the keyword “book”, the keyword will be matched by the regular expression in the following cases:

  • “,book”

But not in the following cases:

  • “abook”
  • “.book”
  • ” book”

POINT

This boundary matches occurrences of the keyword preceded or followed by the point character.

For example, if you select this boundary as the Left Boundary of the keyword “book”, the keyword will be matched by the regular expression in the following cases:

  • “.book”

But not in the following cases:

  • “abook”
  • “,book”
  • ” book”

NONE

This boundary doesn’t require a specific character or regular expression anchor on the left or on the right of the keyword.