Gallery From Regex Matches

Gallery From Regex Matches

Wordpress plugin

Install on Wordpress

App Details

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 limit to 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 can exclude_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 regex w[0u][0u]ti can 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%

Pricing

Starting from $0 per month.

Check Out the Image Slider Widget

By Common Ninja

Image SliderTry For Free!

App Info

Rating

Reviewers

1 reviews

Tags

gallery

Developed By

doddo

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Image Slider for Wordpress logo

Image Slider

Showcase visuals with an image slider that displays multiple images in a smooth slideshow, improves design, and keeps visitors engaged.

Cookie Banner for Wordpress logo

Cookie Banner

Use a Cookie Banner to inform visitors about cookies on your site and let them manage their consent in a clear, structured way.

Glassdoor Reviews for Wordpress logo

Glassdoor Reviews

Show Glassdoor reviews to highlight employee feedback, strengthen employer brand, and help candidates trust your company.

Instagram Feed for Wordpress logo

Instagram Feed

Show Instagram posts in a live feed that keeps content fresh, builds social proof, and helps visitors engage with your brand.

Instagram Slider for Wordpress logo

Instagram Slider

Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.

Google Reviews for Wordpress logo

Google Reviews

Show verified customer feedback with Google Reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions.

Team Members Blobs for Wordpress logo

Team Members Blobs

Use team members blobs to present your staff in a clear, creative format that builds trust, supports transparency, and strengthens brand credibility.

My Reviews on Amazon for Wordpress logo

My Reviews on Amazon

Show your Amazon product reviews with My Reviews on Amazon to build trust, boost credibility, and help visitors make confident purchase decisions.

Before & After Slider for Wordpress logo

Before & After Slider

Add an interactive before and after slider to your site to show visual transformations, capture attention, and help visitors understand real results.

Multi-Row Image Slider for Wordpress logo

Multi-Row Image Slider

Showcase visuals with a multi row image slider that displays images in layered rows, improves design, and helps visitors explore content more easily.

Cookies Consent Bar for Wordpress logo

Cookies Consent Bar

Display a cookies consent bar that explains usage and supports GDPR compliance, enhancing user trust and legal clarity.

Right Click Protection for Wordpress logo

Right Click Protection

Use right click protection to prevent copying by disabling right click actions, protecting your content and reducing unauthorized reuse on your site.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms