Ivysim |
Regex ExplorerPattern Matching Made SimpleRegular expressions are at the core of powerful scripting languages including Perl and Tcl. Many tasks can be simplified with some knowledge of regular expressions. Indeed, some daunting tasks are solved very easily with a little regex knowledge. The Regex Explorer from Ivybridge Simulation provides an interactive assistant to help you write regular expressions quickly. Read in a sample of text you want to search then edit your regular expression - the tool provides instant feedback showing which parts of the text have been matched. When you make mistakes the match disappears. But the undo and redo buttons help you to backtrack. Download
LicenceVersion 1.0 is free to download and use at work or home. ManualThe program is quite self-explanatory. Here are the steps to take:
Note: A Tcl interpreter is built into this application. A Perl interpreter must be installed on your machine for Perl Regular expression matching to work. Regex Syntax Primer
Imagine a large text file contains a line saying how many desks there are then this short Tcl script could open the file and report how many desks are on order: set f [open filename.txt] while {[gets $f line]>=0} { if [regexp {(\d+) desks} $line -> number] { puts "Found $number desks!" } } There's even less to it in Perl: open( F, 'filename.txt' ); while( <F> ) { /(\d+) desks/ and print "Found $1 desks!\n"; } Do you need to learn some more Perl? Start by working through the Quick Start Perl article from Doulos. I wrote this while a member of the Doulos consulting team. Do you need to learn lots of Perl or Tcl? I can recommend the 3 day Essential Perl and Essential Tcl/Tk training courses from Doulos. I did write a lot of this material and might even end up delivering it for you as a Doulos approved training provider.
Simon Dempsey |
Copyright © 2006-2018 Ivybridge Simulation | Email: info6@ivysim.com | Phone: 07704 874512 |