Re: regex help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Joseph L. Casale wrote:
> I need a little help, trying to search for a line that begins with /dev
> and ends with a single digit that I will choose, like 5. I can search for
> ^/dev and 5$ but I am having trouble forming the combined search pattern
> using egrep.

If you mean any single digit not preceded by another digit:

^/dev.*[^0-9][0-9]$

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux