HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- character classes in regular expressions
Operating System - HP-UX
1828322
Members
3832
Online
109976
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 02:39 AM
10-24-2002 02:39 AM
Character classes aren't recognized by grep(1) and awk(1). For instance, the following command line displays nothing:
echo "eeee" | grep -E '[:alpha:]'
Is there any mistake in it ?
echo "eeee" | grep -E '[:alpha:]'
Is there any mistake in it ?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 02:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 03:02 AM
10-24-2002 03:02 AM
Re: character classes in regular expressions
Jean-Louis is right.
grep -E is shorter available as egrep
Jeffrey Friedl has an extensive comparison available in Chapter 6 of his book "Mastering Regular Expressions" 1st ed. The second edition I do not have here at work right now, so I cannot check which chapter it in.
It compares regular expression usage for traditional grep, vi, modern grep, modern sed, egrep, lex, trditional awk, GNU emacs, perl, tcl, default python, and expect
For grep and awk it has two seperate tables to just show the differences between the different versions of grep and awk.
FWIW {:...:] are POSIX character classes. Perl-5.8.0 uses \w for words [A-Za-z0-9_], which automagically includes the `letters' from the current locale
grep -E is shorter available as egrep
Jeffrey Friedl has an extensive comparison available in Chapter 6 of his book "Mastering Regular Expressions" 1st ed. The second edition I do not have here at work right now, so I cannot check which chapter it in.
It compares regular expression usage for traditional grep, vi, modern grep, modern sed, egrep, lex, trditional awk, GNU emacs, perl, tcl, default python, and expect
For grep and awk it has two seperate tables to just show the differences between the different versions of grep and awk.
FWIW {:...:] are POSIX character classes. Perl-5.8.0 uses \w for words [A-Za-z0-9_], which automagically includes the `letters' from the current locale
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 07:22 AM
10-24-2002 07:22 AM
Re: character classes in regular expressions
Thanx a lot everyone.
I read man pages but these tricks cannot be found.
I read man pages but these tricks cannot be found.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP