Sponsored Content
Top Forums Shell Programming and Scripting matching a regex using egrep not working Post 302577202 by skrtxao on Monday 28th of November 2011 11:03:43 AM
Old 11-28-2011
Hi ahamed,

I believe is SunOS 5.10...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

egrep -e not working...!

:cool: fedora core 2 version 2.6.8-1.521 gnu/linux the last version of redhat that I was working with linux 8.0 a special version that came with a book.. on this version and on spider tools linux 0.9 the second version I worked with.. when i envoked egrep -e from file1 to file2 I would get the... (4 Replies)
Discussion started by: moxxx68
4 Replies

2. Shell Programming and Scripting

REGEX: Matching Null?

I'm using the URL Regex feature of Squid for allowing sites via a list of regex strings to match allowed domains. The regex was actually copied from our previous proxy solution and it seemed to "just work". But, we've recently discovered that some domains (likely due to virtual hosts or host... (2 Replies)
Discussion started by: deckard
2 Replies

3. Shell Programming and Scripting

Perl regex help - matching parentheses

Let's say I'm trying to match potentially multiple sets of parentheses. Is there a way in a regular expression to force a match of closing parentheses specifically in the number of the opening parentheses? For example, if the string is "((foo bar))", I want to be able to say "match any number of... (7 Replies)
Discussion started by: cvp
7 Replies

4. Shell Programming and Scripting

egrep regex

Hi, I have a file with some words divided into syllables by the character "|" (pipe). For example zu|ri|ghe|se.I would like a regex that matches all the words that are not divided in syllables.All the word that have no "|" pipe character.I have thought at $echo "zu|ri|ghe|se" | grep '' ... (7 Replies)
Discussion started by: and77
7 Replies

5. Shell Programming and Scripting

Regex/egrep matching numbers in brackets

Experts: I don't know that regular expressions will ever be easy for me, so if one of you guru's could help out, I'd appreciate it. I'm trying to match a line in our syslog, but I can't figure out how to match a number inside a bracket. This is what I'm trying to match. "Jul 16 00:01:34... (2 Replies)
Discussion started by: jdveencamp
2 Replies

6. Shell Programming and Scripting

regex question using egrep

Hi, i have a a bunch of directories that are always named with six lowercase alpha's and either one or two numeric's (but no more) so for example names could be qwerty1 qwerty9 qwerty10 qwerty67 I am currently using two pattern matches to capture these names echo $DIR |... (8 Replies)
Discussion started by: rethink
8 Replies

7. Shell Programming and Scripting

Regex for HP egrep

I seem to be having an issue with an egrep command and I think its the way it is interpreting my regex. I have a test file.. ###FIND THESE### telnet /telnet `telnet -l` ###Dont FIND THESE### donotfindtelnet telnetdontfind Working Regex on Linux/Solaris egrep '\<(telnet|rcp)\>' $file ... (4 Replies)
Discussion started by: nitrobass24
4 Replies

8. Shell Programming and Scripting

Egrep not working with -f option

Hi, I am trying to find out patterns in file 1 using patterns stored in file 2. Following is the code FILE1=inputfilename FILE2=blacklist blacklist 1203 97715555 20afEOF egrep -f $FILE2 $FILE1 but the above code is not working either using egrep or grep. Just for your... (10 Replies)
Discussion started by: siramitsharma
10 Replies

9. UNIX for Dummies Questions & Answers

Regex matching with grep -l

I am trying to find patterns in files using grep -l -e. I specifically am searching for abc. I want any file that has abc in it, but not just the letters abc. I am searching for a pattern a followed by b followed by c. I have tried egrep -l and also I have tried the following: grep -el... (2 Replies)
Discussion started by: newbie2010
2 Replies

10. UNIX for Beginners Questions & Answers

Egrep command is not working for me

my file is below REREGISTER is something to Failed to create the request Failed to create the request in not easy I know how REREGISTERcommand i run is egrep 'REREGISTER|Failed|to|create|the|request' test1 expected output REREGISTER is something to Failed to create the request i should... (2 Replies)
Discussion started by: mirwasim
2 Replies
RE_COMP(3)						   BSD Library Functions Manual 						RE_COMP(3)

NAME
re_comp, re_exec -- regular expression handler LIBRARY
Compatibility Library (libcompat, -lcompat) SYNOPSIS
#include <unistd.h> char * re_comp(const char *s); int re_exec(const char *s); DESCRIPTION
This interface is made obsolete by regex(3). The re_comp() function compiles a string into an internal form suitable for pattern matching. The re_exec() function checks the argument string against the last string passed to re_comp(). The re_comp() function returns 0 if the string s was compiled successfully; otherwise a string containing an error message is returned. If re_comp() is passed 0 or a null string, it returns without changing the currently compiled regular expression. The re_exec() function returns 1 if the string s matches the last compiled regular expression, 0 if the string s failed to match the last compiled regular expression, and -1 if the compiled regular expression was invalid (indicating an internal error). The strings passed to both re_comp() and re_exec() may have trailing or embedded newline characters; they are terminated by NULs. The regu- lar expressions recognized are described in the manual entry for ed(1), given the above difference. DIAGNOSTICS
The re_exec() function returns -1 for an internal error. The re_comp() function returns ``no previous regular expression'' or one of the strings generated by regerror(3). SEE ALSO
ed(1), egrep(1), ex(1), fgrep(1), grep(1), regex(3) HISTORY
The re_comp() and re_exec() functions appeared in 4.0BSD. BSD
June 4, 1993 BSD
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy