Skip to content

Match a link with a regular expression

Use a regular expression when the simple suggestions can’t describe the links you want. Bouncer tests the pattern against your example link as you type.

  1. Enter a real link in Example link:.
  2. Click Advanced matching with regex under When…. A text box replaces the suggestions. Bouncer fills it with a regex built from the suggestion you had selected.
  3. Enter your pattern in the box.
  4. Watch the border color and the caption under the box. Green means the pattern matches the example link.
  5. Click Save Rule.
BorderMeaningCaption
GreenThe pattern matches the example link.Match followed by the position and the matched text. Long text is cut at 30 characters.
OrangeThe pattern is valid but does not match the example link.✗ Doesn’t match your example link
RedThe pattern will not compile.Invalid regex

With no example link, the caption reads Paste an example link above to test and there is no color.

When the pattern matches, Bouncer also highlights the matched part inside Example link:.

Matching is case-insensitive. Zoom and zoom match the same links.

Bouncer tests the pattern against the whole link, including https://. The pattern does not need to match from the start. It can match anywhere in the link.

A rule whose pattern will not compile never matches. The Rules list marks it with an orange warning triangle.

To go back to simple mode, click Simple matching patterns. Your earlier suggestion is selected again.

For syntax and worked examples, see the Regex and rewrite cheat sheet.