Sponsored Content
Full Discussion: Regex with spaces
Top Forums Shell Programming and Scripting Regex with spaces Post 303015244 by RudiC on Saturday 31st of March 2018 08:41:48 AM
Old 03-31-2018
Actually, the test looks if there's just any single upper case char OR any whitespace in the variable's contents; so both examples should print yes, as does a a string or a 1234S2345. You may want to reconsider your problem.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

2. Shell Programming and Scripting

Need a regex

Hi, I am trying to grep for the following type of string from a document given below: 12637 1239 3356 12956 7004 7004 7004 13381 13381 *> 12.0.1.63 0 7018 21872 ? * 208.51.134.254 53 0 3549 7018 21872 ?... (1 Reply)
Discussion started by: Legend986
1 Replies

3. UNIX for Dummies Questions & Answers

how to append spaces(say 10 spaces) at the end of each line based on the length of th

Hi, I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is. I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies

4. Shell Programming and Scripting

Regex

How do I write a regular expression to capture the comments of Pascal which are usually delimted by (* and *) or { and }? And also I need a regular expression to express financial quantities in American Notation. They have a leading dollar sign and an optional string of asteriks,a string of decimal... (1 Reply)
Discussion started by: saikrishnan7
1 Replies

5. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

6. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

7. Shell Programming and Scripting

[BASH] Allow name with spaces (regex)

Hey all, I have a very simple regular expression that I use when I want to allow only letters with spaces. (I know this regex has a lot of shortcomings, but I'm still trying to learn them) isAlpha='^*$'However, when I bring this over to BASH it doesn't allow me to enter spaces. I use the... (3 Replies)
Discussion started by: whyte_rhyno
3 Replies

8. UNIX for Dummies Questions & Answers

read regex from ID file, print regex and line below from source file

I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header. In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

9. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

10. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
ISWUPPER(3)						     Linux Programmer's Manual						       ISWUPPER(3)

NAME
iswupper - test for uppercase wide character SYNOPSIS
#include <wctype.h> int iswupper(wint_t wc); DESCRIPTION
The iswupper() function is the wide-character equivalent of the isupper(3) function. It tests whether wc is a wide character belonging to the wide-character class "upper". The wide-character class "upper" is a subclass of the wide-character class "alpha", and therefore also a subclass of the wide-character class "alnum", of the wide-character class "graph" and of the wide-character class "print". Being a subclass of the wide-character class "print", the wide-character class "upper" is disjoint from the wide-character class "cntrl". Being a subclass of the wide-character class "graph", the wide-character class "upper" is disjoint from the wide-character class "space" and its subclass "blank". Being a subclass of the wide-character class "alnum", the wide-character class "upper" is disjoint from the wide-character class "punct". Being a subclass of the wide-character class "alpha", the wide-character class "upper" is disjoint from the wide-character class "digit". The wide-character class "upper" contains at least those characters wc which are equal to towupper(wc) and different from towlower(wc). The wide-character class "upper" always contains at least the letters 'A' to 'Z'. RETURN VALUE
The iswupper() function returns nonzero if wc is a wide character belonging to the wide-character class "upper". Otherwise it returns zero. CONFORMING TO
C99. NOTES
The behavior of iswupper() depends on the LC_CTYPE category of the current locale. This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower and title case. SEE ALSO
isupper(3), iswctype(3), towupper(3) COLOPHON
This page is part of release 3.44 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 ISWUPPER(3)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy