Rob van der Woude's Scripting Pages

Regular Expressions Examples

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

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

 

Sample Scripts Using Regular Expressions
Click the diskette icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped sources Name Description Remarks
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BatCodeCheck.exe Search batch source code for common errors and security vulnerabilities Written in C#
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOSInfo.pl Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOSInfo.rex Display BIOS manufacturer & date Uses DEBUG to read info from BIOS
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BirdName.hta Translate bird names Uses Wikipedia to find translations
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BkAllDrv.pl Backup all Windows 2000 drivers This scripts requires Microsoft's DEVCON utility
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CameraModel.exe Return the camera model for the specified image file, optionally looking for a specific brand only Reads only the first 1024 bytes of the image file, making it faster than alternative solutions
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CanonModel.exe Return the Canon camera model for the specified image file Reads only the first 1024 bytes of the image file, making it faster than alternative solutions
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Choice.pl A limited port of MS-DOS' CHOICE command More info on the CHOICE command
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CrLf.pl Replace orphaned CR or LF with CR/LF pairs CR = Carriage Return, LF = Line Feed
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CrLf2Lf.pl Replace CR/LF pairs with LF's only
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DblCr2Cr.pl Replace double CR/LF pairs with single pairs
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Cut.pl "Cut" substrings from standard input Explained (a little) on my Unix ports page
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DefPRN2K.pl Display default printer for Windows 2000 Tested only in Windows 2000
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ListIntCmd.exe List all available internal commands Written in C#
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source MidiTitl.pl Display title(s) of specified MIDI file(s)  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source PDFPageCount.bat Return the page count for the specified PDF file(s)  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source PDFPageCount.exe Return the page count for the specified PDF file(s) Written in C#
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ReadINI.pl Read a value from an INI file  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RFaR.vbs Regex Find and Replace Can be used to replace text in ASCII files or strings
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RXDir.bat Use Regular eXpressions in the DIR command Uses EGREP
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RxGrep.exe Multi-line GREP/FINDSTR like tool Written in C#
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RxReplace.exe Multi-line regex based find and replace tool Written in C#
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped 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 download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source VideoROM.pl Display video adapter manufacturer info read from video ROM Uses DEBUG (original idea by ComputerHope)
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source UpdateCheck.hta Check if a newer version of the specified program is available, and if so offer to download it requires UpdateCheck.ini
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Which.pl Locate the specified program file Explained (a little) on my Unix ports page

page last uploaded: 2016-09-19, 14:57