RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(eth[0-9]$)|(^eth[0-9]:[1-9]$)
Description
regex to validate unix device names (linux). useful for scripts using ifconfig or stuff
Matches
eth0 | eth0:4 | eth4:9
Non-Matches
eth0: | eth0:0 | eth0:1d
Author Rating: The rating for this expression. Joey Brunner
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: why use | ?
Name: Mike
Date: 2/4/2005 10:18:09 AM
Comment:
You can make it so: ^eth[0-9](:[0-9])?$


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials