Just Great Software

Regex Buddy - Learn, create, understand, test, use and store regular expressions

 Introduction 

 

 Buy Now 

 Our Guarantee 

 Download 

 Testimonials 

 Contact Us 

 User Forum 

 

 Screen Shots 

 Live Demos 

 Regular Expressions 

 Features & Benefits 

 Learn 

 Build 

 Understand 

 Test & Highlight 

 Debug 

 Use & Implement 

 Save & Reuse 

 GREP 

 Integrate 

 Programming 

 Linux 

 

 Press Resources 

 Version History 

 Newsletter 

 Affiliates 

 

 

PowerGREP - Find files and information or search and replace through files and folders
EditPad - Convenient, powerful and versatile text editor to edit all kinds of text files
Ace Text - Store, manage, edit and reuse text from a central location
HelpScribble - Full-featured help authoring tool for creating help files from start to finish
DeployMaster - Installation builder delivering your software with a good first impression
      

Analyze and Understand Other People's Regular Expression Patterns
Learn Regex By Example

Regex Tree and Regex Building Blocks

When you need to edit a regular expression written by somebody else, or if you are just curious to understand or study a regex you encountered, copy and paste it into RegexBuddy. If the regex is used as part of an application's source code, just copy the entire string or regex operator. RegexBuddy will properly extract the regex from the string. E.g. when working with Java code, copy the Java string containing the regex and select "Paste as C-style string" in RegexBuddy. RegexBuddy then properly removes the quotes and escape characters.

As soon as you paste in the regex, RegexBuddy's regex tree will give you a clear analysis of the regular expression. Click on the regular expression, or on the regex tree, to highlight corresponding parts. Collapse part of the tree to get a good overview of complex regular expressions. If you are new to regular expressions, this is an excellent way to learn by example.

When the brief descriptions of the regex tree are not clear enough, just click the Explain Token button to access RegexBuddy's detailed regular expression tutorial. You will find answers to all your questions there. (At least, those questions concerning regular expressions.)

Export the regex tree to an HTML file to document the regular expression outside of RegexBuddy. In JavaScript-enabled browsers, moving the mouse will highlight corresponding parts, as you can see below.

      
Only US$ 39.95
Windows 98, ME, NT4, 2000, XP and Vista
100% satisfied or money back

RegexBuddy’s plain English regex tree makes it easy to understand exactly what a regular expression does

RegexBuddy’s plain English regex tree makes it easy to understand exactly what a regular expression does

Example: Matching a Pair of HTML Bold Tags

<B[^>]*>(.*?)</B>

  • Match the characters "<B" literally
  • Match a single character not present in the list: one of the characters ">"
    • Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
  • Match the character ">" literally
  • Match the regular expression below and capture its match into backreference 1
    • Match any single character
      • Between zero and unlimited times, as few times as possible, expanding as needed (lazy)
  • Match the characters "</B>" literally
"Today I finally purchased your software to help fix a bug in some lexer regular expressions. Within 5 minutes of deciding to purchase the bug was fixed. The tree view of the regex made it so easy to find the problem."

-- Robert Stehwien
   29 November 2007, New Mexico, USA

Confidently Work With Regular Expressions

Of course, the only way to be 100% sure if a regex matches a particular piece of text is to try it and find out. Just click on the Test tab, click the Highlight button, and type in the text or open the file you want to test the regex against. You will see right away what matches, and what does not.

Once you understand the pattern, store the regular expression into a RegexBuddy library for later reuse. Or, edit the regex and replace the original.

RegexBuddy takes the mystery out of regular expressions. Never again encounter a regex that you can't comprehend. Get your own copy now!

Let RegexBuddy Make Regex Easy for You

"I bought RegexBuddy a few months ago, being a bit reluctant about creating those complex regex queries.

"I have to say that I am truly amazed by the program. I now solve complex tasks fairly quickly with it. It definitely delivers what it promises and makes regex as easy as it can be. I use it almost on a daily basis now and it makes my life as a PHP programmer much easier."

-- Joris Vincken
   24 September 2006, The Netherlands

 

 

Page URL: http://www.regexbuddy.com/analyze.html
Page last updated: 30 November 2007
Site last updated: 18 August 2008

Published by Just Great Software Co. Ltd.
Copyright © 2004-2007 Jan Goyvaerts.
All rights reserved.