Regular expressions (abbreviated regex) are terms that define a search pattern to focus on a specific part of a string for a specific purpose (e.g. to find/replace a word).

learn more… | top users | synonyms

2
votes
1answer
274 views

Retrieving all Links from a Post?

i'm using the default "insert video" function from wordpress (which inserts a normal hyperlink to the video only) and would like to replace that link with something else like a video player. my ...
0
votes
2answers
260 views

Testing a Form's Zipcode Field with Regular Expressions to Determine Wordpress Page Behaviour

I want to use a Regular Expression(regex) to test the value of a form's zipcode field on a WordPress page, then based upon those results either: Selectively assign/reveal price fields on the same ...
1
vote
2answers
1k views

How to change the admin menu “Pages” to something else

When one creates a custom post type you have the ability to define various elements related to that post type which essentially allow you to define things such as the menu title, "add new post" text ...
1
vote
3answers
383 views

404 regular-expression advice needed

I have been working hard trying to understand regular-expressions to use in my web site using the redirection plugin. I have changed my permalinks a few times in the past year because I did not know ...
4
votes
3answers
1k views

Nested Shortcode Detection

If you are familiar with this code <?php $pattern = get_shortcode_regex(); preg_match('/'.$pattern.'/s', $posts[0]->post_content, $matches); if (is_array($matches) && $matches[2] ...
1
vote
2answers
809 views

How to apply content filter permanently?

I have the following temporary filter to fix a content error. We have data in our posts that have 4 digit zip codes, because the leading zero was cut when the original file was created. (For instance, ...