Regular Expressions Examples

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

Checksums for the ZIPed sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPed sources

 

Sample Scripts Using Regular Expressions
Click the diskette icon to dowload the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed sources Name Description Remarks
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source BIOSInfo.pl Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source BIOSInfo.rex Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source BkAllDrv.pl Backup all Windows 2000 drivers This scripts requires Microsoft's DEVCON utility
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source BookFind.vbs Look up author and title for a specified ISBN number This scripts uses Amazon.com to look up author & title
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Choice.pl A limited port of MS-DOS' CHOICE command More info on the CHOICE command
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source CrLf.pl Replace orphaned CR or LF with CR/LF pairs CR = Carriage Return, LF = Line Feed
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source CrLf2Lf.pl Replace CR/LF pairs with LF's only
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source DblCr2Cr.pl Replace double CR/LF pairs with single pairs
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Cut.pl "Cut" substrings from standard input Explained (a little) on my UNIX ports page
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source DefPRN2K.pl Display default printer for Windows 2000 Tested only in Windows 2000
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source FaR.pl Find And Replace substrings in a string A good example of string manipulation using regular expressions
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source MidiTitl.pl Display title(s) of specified MIDI file(s)  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source PDFPageCount.bat Return the page count for the specified PDF file(s)  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source PDFPageCount.exe Return the page count for the specified PDF file(s) Written in C#
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source PrintPDF.pl Print a list of specified PDF files This script will only work if Acrobat Reader is the default association for PDF files
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source ReadINI.pl Read a value from an INI file  
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source ReadReg.bat Read a value from the registry May fail on "special" characters like & | < > and brackets.
Uses FINDSTR if available, or EGREP otherwise
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source RFaR.vbs Regex Find and Replace Can be used to replace text in ASCII files or strings
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source RXDir.bat Use Regular eXpressions in the DIR command Uses EGREP
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source 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
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source VideoROM.pl Display video adapter manufacturer info read from video ROM Uses DEBUG (original idea by ComputerHope)
Click the floppy disk icon to dowload the ZIPed source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPed source Which.pl Locate the specified program file Explained (a little) on my UNIX ports page

 

 


page last uploaded: 14 October 2011, 22:40