Gallery From Regex Matches
A plugin which adds a shortcode: [gallery_from_regex_matches] in which a regex attribute should be specified. It will then look for matches in the descriptions and titles of all published images in your library, and…
Consider an alternative
Gallery From Regex Matches shows warning signs in 2026 — compare the alternatives below before installing. Is rated 5/5 and was last updated 8 years ago, and scores 28/100 on our health check.
- Small user base (<10 active installs)
- Very few reviews so far
- No update in 7 years
- Only tested up to WordPress 5.2 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Gallery From Regex Matches stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| gallery | >100 |
Rating breakdown
★★★★★★★★★★ 5 from 1 reviews
About Gallery From Regex Matches
From the official readme · v0.6.3Description
A plugin which adds a shortcode: [gallery_from_regex_matches] in which a regex attribute should be specified. It will then look for matches in the descriptions and titles of all published images in your library, and create a gallery from the matches it finds.
- Use for example like this
[gallery_from_regex_matches regex="lillill" exclude_ids="764"], and it will generate a gallery of all your pictures of “Lillill”, except the one which has ID 764. - Sometimes it might be advicable to limit the amount of matches. that can be achieved by adding
limitto the shortcode.[gallery_from_regex_matches regex="lillill" exclude_ids="764" limit="10"]. - Sometimes you want to make a gallery of “cats” but not “catsup”, but you don’t want to add word boundary
[[:>:]], in this case you canexclude_regex=catsup. Then it could look something along the line of[gallery_from_regex_matches regex="cats" exclude_regex="catsup"]. - The same params (except for
ids) as for the[media]shortcode can be used (as this plugin calls that shortcodes callback function (gallery_shortcode()) to generate the gallery), so if you want to specify a particular type (style) of gallery from for example your cat pictures , this might do the trick:[gallery_from_regex_matches regex="(cat|kitten)" type="square"]. - The regular expressions follows the MySQL Regexp syntax
- Some characters will per default not work inside of the shortcode, see the “Caveats” section.
- There are no bells and whistles for this plugin but it could potentionally be added in the futre.
Caveats
Since the regex used by the plugin is specified as an attribute value inside of a shortcode, and the Shortcode Api disallows the use of certain characters which could be a part of a valid, useful regex, there are some things to consider.
Attribute values must never contain the following characters:
* Square braces: [ ]
* Quotes: ” ‘[ … ]
The recommended method of escaping special characters in shortcode attributes is HTML encoding. Most importantly, any user input appearing in a shortcode attribute must be escaped or stripped of special characters.
- if in the regex you need to macth a character set
[a-z], then (following the shortcode Api documentation guidline), they need to be encoded. There are two encodings which the plugin accepts: “html” and “base64” - Currently there is no way to encode these things with help of the plugin, although it is planned for a future release, so the regexes must be encoded manually for now’
For example, for regexw[0u][0u]tican be expressed either:
With HTML encoding:
[gallery_from_regex_matches regex="w[0u][0u]ti" encoding="html"]
With Base64 encoding:
[gallery_from_regex_matches regex="d1swdV1bMHVddGk=" encoding="base64"]
To encode a string to base64, it can be done from the terminal like this:
% echo -n "catsup" | base64
Y2F0c3Vw
% echo -n Y2F0c3Vw | base64 --decode
catsup%
Installation
- unpack the zip into the
/wp-content/pluginsdir - Activate the plugin through the ‘Plugins’ menu
Changelog
Performance upgrade, no need to use delimiter '/' when specifying regex, because MySQL run sthe regexes now. All existing slashes and flags will be stripped from regex before running to maintain backwards compatiblity.
0.6.3
- Fixed a bug in which attachments with no parent were never selected.
0.6.2
- Fixed a bug with mysql query and empty regexp
0.6.1
- Added
exclude_regexshortcode parameter.
0.6.0
- Move the regex matching into the database and use MySQL regex syntax instead of calling all posts and applying the regex filters on them. This to increase performance and to work better on big galleries.
- Syntax for regex attr then is also slightly changed: no need to use delimiter ‘/’: “
/(cat|kitten)/” is now written “(cat|kitten)“, but either way will work for backwards-compatiblity reasons. - Number of matches can now be limited with the
limitwhich defaults to 10000, but can be set to a higher value if need be.
0.5.1
- Add possibility of decoding encoded regexes, so that special characters which would collide with the Shortcode Api can still be used in them.
0.5
- Search also title field
- use preg_grep on array of target search fields instead of concatinating it to a string as that can lead to unforseen matches.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Gallery From Regex Matches alternatives
All gallery plugins →FAQ
Gallery From Regex Matches: quick answers
Straight answers, pulled from live WordPress.org data.
Source: WordPress.org
Is Gallery From Regex Matches free?
Yes. Gallery From Regex Matches is free to download and use from the official WordPress.org plugin directory.
Is Gallery From Regex Matches safe to use in 2026?
Gallery From Regex Matches shows warning signs in 2026 — compare the alternatives below before installing. Is rated 5/5 and was last updated 8 years ago, and scores 28/100 on our health check.
How many websites use Gallery From Regex Matches?
Gallery From Regex Matches is active on <10 WordPress websites and has been downloaded 1,706 times since it launched in January 2018. It was downloaded 43 times in the last 30 days.
Does Gallery From Regex Matches work with WordPress 7.1?
Gallery From Regex Matches is officially tested up to WordPress 5.2.31, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does Gallery From Regex Matches need?
Gallery From Regex Matches requires PHP 7.0 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Gallery From Regex Matches last updated?
The latest version, 0.6.3, was released on May 30, 2019 (8 years ago).
Who makes Gallery From Regex Matches?
Gallery From Regex Matches is developed and maintained by doddo.
What are the best alternatives to Gallery From Regex Matches?
The most popular alternatives to Gallery From Regex Matches are Smart Slider 3 (800K+ installs), Slider, Gallery, and Carous… (500K+ installs) and Photo Gallery, Sliders, Pro… (300K+ installs).
Powered by PageForge
One template and a spreadsheet. A real page for every search.
PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.
- CSV and XLSX, plus Google Sheets on Professional and Enterprise
- Its own title, URL, SEO fields and schema for every page
- Works with the block editor, Elementor, Divi and Avada
- Free on WordPress.org, no credit card
