Regular Expressions Examples

Download the ZIPped sources Click the floppy disk icons to download the ZIPped sources

 

Sample Scripts Using Regular Expressions
Download the ZIPped sources Name Description Remarks
Download the ZIPped sources BIOSInfo.pl Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Download the ZIPped sources BIOSInfo.rex Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Download the ZIPped sources BkAllDrv.pl Backup all Windows 2000 drivers This scripts requires Microsoft's DEVCON utility
Download the ZIPped sources BookFind.vbs Look up author and title for a specified ISBN number This scripts uses Amazon.com to look up author & title
Download the ZIPped sources CanonReport.vbs Display a report for a Canon IR3320 printer's total print output This script may or may not work on other Canon printer models too
Download the ZIPped sources Choice.pl A limited port of MS-DOS' CHOICE command More info on the CHOICE command.
Download the ZIPped sources CrLf.pl Replace orphaned CR or LF with CR/LF pairs CR = Carriage Return, LF = Line Feed
Download the ZIPped sources CrLf2Lf.pl Replace CR/LF pairs with LF's only
Download the ZIPped sources DblCr2Cr.pl Replace double CR/LF pairs with single pairs
Download the ZIPped sources Cut.pl "Cut" substrings from standard input Explained (a little) on my CUT page
Download the ZIPped sources DefPRN2K.pl Display default printer for Windows 2000 Tested only in Windows 2000
Download the ZIPped sources FaR.pl Find And Replace substrings in a string A good example of string manipulation using regular expressions
Download the ZIPped sources MidiTitl.pl Display title(s) of specified MIDI file(s)  
Download the ZIPped sources Obscure.pl Obscure an URL by converting its host name part to a decimal IP address and by optionally adding a fake logon name Your browser's security settings may block the use of decimal IP addresses
Download the ZIPped sources PrintPDF.pl Print a list of specified PDF files This script will only work if Acrobat Reader is the default association for PDF files
Download the ZIPped sources ReadINI.pl Read a value from an INI file  
Download the ZIPped sources ReadReg.bat Read a value from the registry May fail on "special" characters like & | < > and brackets.
Uses FINDSTR if available, or EGREP otherwise.
Download the ZIPped sources ReadReg.pl Read a value from the registry  
3rd party tool, no ZIPped source available Ren_ext.pl Rename files using regular expressions Written by seth
Download the ZIPped sources RXDir.bat Use Regular eXpressions in the DIR command Uses EGREP.
Download the ZIPped sources SCSI.bat (V1) Enumerate disk drives (IDE and SCSI) Version 1 uses EGREP, as of version 2 Windows 2000's internal FOR command is used instead
Download the ZIPped sources VideoROM.pl Display video adapter manufacturer info read from video ROM Uses DEBUG (original idea by ComputerHope)
Download the ZIPped sources Which.pl Locate the specified program file Explained (a little) on my WHICH page