Just Great Software

RegexMagic - Generate regular expressions

 Introduction 

 

 Buy Now 

 Our Guarantee 

 Download 

 Testimonials 

 Contact Us 

 User Forum 

 

 Screen Shots 

 Live Demos 

 Features & Benefits 

 Many Patterns 

 Loose or Strict 

 Popular Flavors 

 Programming 

 GREP 

 Auto-generating 

 

 Version History 

 Newsletter 

 Blog 

 Affiliates 

 

 

RegexBuddy - Learn, create, understand, test, use and store regular expressions
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
AceText - 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
      

Generate Regular Expressions as Loose or as Strict as You Like

Simple or Complex, Fast or Accurate

When creating regular expressions, you often have to choose between creating fast and simple regular expressions, or complex and accurate regular expressions. When using a regex to search for dates, should the regular expression make sure to exclude February 30th, or is anything in the form of 99/99/99 acceptable? The answer will depend on your goals. Validating user input usually requires an exact regex. Scanning large amounts of data is often better done with a simple regex to save time, particularly if you can trust the data to be valid already.

In the past, people would often settle for simple regexes. It just takes too much time to spell out everything character by character as the regex syntax requires.

With RegexMagic, creating an accurate regex is just as easy as creating a simple one. RegexMagic's patterns provide a wide range of options to specify exactly what you want. The screen shot to the right shows how one simple integer pattern yields a rather long regular expression to match a number between 42 and 2552, and nothing else. Notice the option at the bottom that is set to "strict".

The next screen shot shows what happens if you set that same option at the bottom of the Match panel to "loose". RegexMagic now generates a much shorter regex. Instead of strictly matching numbers between 42 and 2552, the new regex simply matches numbers with 2 to 4 digits. The other two available options (not shown) are "average" and "none".

Since RegexMagic makes it so easy to generate strict regular expressions, you'll do that most of the time. But when combining multiple patterns, you may end up with a regex that's too complex for your target application to handle fast enough. That's when you'll dial RegexMagic down to "average" or "loose". Or, you may be working with a tool or programming language that only supports a simple regex flavor. Then you may need to use the "none" option, which only uses elementary regular expression features.

Easily Create Regexes with RegexMagic

      
Only US$ 39.95
Windows 98, ME, NT4, 2000, XP, Vista, and 7
100% satisfied or money back
free trial download
Generating a strict regular expression

Generating a strict regular expression


Generating a loose regular expression

Generating a loose regular expression

 

 

Page URL: http://www.regexmagic.com/strict.html
Page last updated: 20 July 2009
Site last updated: 03 March 2010

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