Resources

Preview Live Regex

Regular expressions are a great way to find a pattern of text to do a global replace or to store the variables of the pattern. The problem comes when you have quite a complicated pattern that you are trying to match. You might need to make lots of changes to your code for it to work correctly. This continued code changes and re-testing your code can be very time consuming, you need a better way of testing your regular expressions.

If you are creating a htaccess file to match URLs and redirect else where then you need a good way of testing the pattern.

Here is a really good tool for testing regular expressions, it's called PHP Live Regex and allows you to test matching your regex with a number of different strings. If you are using the preg_match() function then this tool will even provide you with an array of matches you will get from this regular expression.

Once you have finished your regex to match the strings you want, you can save this code by creating a URL for this regex code. Which makes this tool really useful for code sharing, if you have created a regex and want to share this with other developers you can do so with a simple link.

PHP Live Regex

Try it out.

PHP Live Regex

Back to top ^

Join Paulund

  • Get access to 100s of premium tutorials and downloadable content
  • Members content consists of Premium WordPress plugins, CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
  • In-depth development tutorials
  • Priority tutorial requests
  • Priority email development support
  • No ads

Here at Paulund you'll find Web Development tutorials and snippets focusing mainly on PHP, WordPress and CSS. Members will get access to premium tutorials that go into more detail about development with these languages. You will also get access to downloadable premium content based on the tutorial.

Join Paulund

Leave a Reply

Your email address will not be published. Required fields are marked *