10-30-2015
[^A-Za-z0-9_] replicates the "... non-word constituent character. Word- constituent characters are letters, digits, and the underscore" (cf man grep). This is ORed with begin-of-line ("^") or end-of-line ("$"), respectively. The -E option is necessary to accept the EREs.
---------- Post updated at 12:41 ---------- Previous update was at 12:39 ----------
In non-C locales, that regex may not be sufficient. The [[:alnum:]] class will take care of that, but may not be available on your system.
This User Gave Thanks to RudiC For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am looking for a file with 'MCR0000000716214' in it. I tried the following command:
grep MCR0000000716214 *
The problem is that the folder I am searching in has over 87000 files and I am getting the following:
bash: /bin/grep: Arg list too long
Is there any command I can use that can... (6 Replies)
Discussion started by: runnerpaul
6 Replies
2. Shell Programming and Scripting
Hi,
i need to use --alternative option of getopt
for ex . getopt -o a:c: --alternative pw: -- "$@"
if i use like this, i am not getting any output.Please help me how to correct this.i need to have a combination of long and short options.But long options have to begin with - and not... (0 Replies)
Discussion started by: padmisri
0 Replies
3. Shell Programming and Scripting
How to find a particular line in a file without using grep? (3 Replies)
Discussion started by: proactiveaditya
3 Replies
4. Shell Programming and Scripting
Hello,
I am processing a text file which contains only words with few combination of characters (it is a dictionary file).
example:
havana
have
haven
haven't
havilland
havoc
Is there a way to exclude only 1 to 8 character long words which not include space or special characters : '-`~.. so... (5 Replies)
Discussion started by: alekkz
5 Replies
5. Shell Programming and Scripting
Hi,
what is the meaning of -n option before the grep command ?
grep command searches for the specified string in the file tmp_crontab.txt
but what does -n mean ?
With Regards (1 Reply)
Discussion started by: milink
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
We used to use the below commands often.
ps -ef|grep bc
ps -ef|grep abc|grep -v grep
Both fairly returns the same result.
For example, the process name is dynamic and we are having the process name in a variable, how we can apply the above trick.
For example "a" is the... (11 Replies)
Discussion started by: pandeesh
11 Replies
7. Shell Programming and Scripting
Hi Experts,
PFB my requirement:
I have a file (named file1) containing numbers like:
372846078543002
372846078543003
372846078543004
372846078543005
372846078543006
I have another file (nemed file2)where lines containing these numbers(present in file1) are present; Eg:
lppza087; <PERFB >... (6 Replies)
Discussion started by: niladri29
6 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to select 30 days older files under current directory ,but not from subdirectory using below command.
find <Dir> -type f -mtime + 30
This command selecting all the files from current directory and also from sub directory .
I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies
9. Shell Programming and Scripting
say I have a big list of something like:
sdg2000
weghre10
fewg53
gwg99
jwegwejjwej43
afg10293
I want to remove the numbers of any line that has letters + 1 to 4 numbers
output:
sdg
weghre
fewg
gwg
jwegwejjwej
afg10293 (7 Replies)
Discussion started by: Siwon
7 Replies
LEARN ABOUT SUSE
iswalnum
ISWALNUM(3) Linux Programmer's Manual ISWALNUM(3)
NAME
iswalnum - test for alphanumeric wide character
SYNOPSIS
#include <wctype.h>
int iswalnum(wint_t wc);
DESCRIPTION
The iswalnum() function is the wide-character equivalent of the isalnum(3) function. It tests whether wc is a wide character belonging to
the wide-character class "alnum".
The wide-character class "alnum" is a subclass of the wide-character class "graph", and therefore also a subclass of the wide-character
class "print".
Being a subclass of the wide-character class "print", the wide-character class "alnum" is disjoint from the wide-character class "cntrl".
Being a subclass of the wide-character class "graph", the wide-character class "alnum" is disjoint from the wide-character class "space"
and its subclass "blank".
The wide-character class "alnum" is disjoint from the wide-character class "punct".
The wide-character class "alnum" is the union of the wide-character classes "alpha" and "digit". As such, it also contains the wide-char-
acter class "xdigit".
The wide-character class "alnum" always contains at least the letters 'A' to 'Z', 'a' to 'z' and the digits '0' to '9'.
RETURN VALUE
The iswalnum() function returns nonzero if wc is a wide character belonging to the wide-character class "alnum". Otherwise it returns
zero.
CONFORMING TO
C99.
NOTES
The behavior of iswalnum() depends on the LC_CTYPE category of the current locale.
SEE ALSO
isalnum(3), iswctype(3)
COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU
1999-07-25 ISWALNUM(3)