RegEx with exceptions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting RegEx with exceptions
Prev   Next
# 1  
Old 05-22-2013
RegEx with exceptions

I am totaly new to RegEx, but I need to extract emails with RegEx from text file

Some difficulties:

1. “@”symbol has been substituted for “ at ”,"AT" or "(at)"

2. I do not need any email with domain "myoldcompany"
I found that with these I can found any emails:
"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
How to do the following?



Thanks for any help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Wildcards and exceptions

Hello: I have a very basic question. I'd like to select all files except for one file. For example, say I want to move all of the files in my current directory to a subdirectory called archive, I would use mv ./* archive/ But what if I want to move all files except for README.txt? Is there an... (19 Replies)
Discussion started by: Danny.Boy
19 Replies

3. IP Networking

SIGUP Exceptions during the execution

hello, I am getting SIGUP Exceptions during an execution of a procedure. Below is the log: Type: SignalException Message: SIGHUP Backtrace: 12:38 PM Action threw an exception: SIGHUP 12:38 PM Action threw an exception: SIGHUP E, ERROR -- : Type: SignalException Message: SIGHUP... (1 Reply)
Discussion started by: Deepthi.Prakash
1 Replies

4. Programming

Relationship between exceptions and signals

Hi everyone, I am using AIX 6.1. There are exception codes defined in header file sys/m_except.hAlso, in the documentation (in "Understanding exception handling") it says: If no exception handler is currently defined when an exception occurs, typically one of two things happens. If... (0 Replies)
Discussion started by: manolo123
0 Replies

5. UNIX for Dummies Questions & Answers

Diff with exceptions Question

So I'm currently developing an automated test system and I'm verifying my results by running a set of baselined data through and comparing the output (which is in a txt file) to a baseline results file. So of course I'm just using the diff command. Unfortunately each time I run the test there are 2... (3 Replies)
Discussion started by: Smitty0881
3 Replies

6. UNIX for Advanced & Expert Users

java Exceptions color

Hi, I call a java program from a cron job and i need to display the exceptions or Errors thrown by java(basically stacktrace) in the unix/linux console in the red color.Is it possible to do that? If so, pls. give me some pointers how to do that. eg: Exception in thread "main"... (0 Replies)
Discussion started by: ramse8pc
0 Replies

7. Shell Programming and Scripting

Remove directory with exceptions

Hi, I want to remove a directory recursively except the inside directories calles .SYNC (designsync dirs) I am looking for something like: \rm -rf < find . * | grep -v .SYNC The find works ok but I do not know how to redirect it. Please help. Regards, Ziv (3 Replies)
Discussion started by: zivsegal
3 Replies

8. UNIX for Advanced & Expert Users

Remove directory with exceptions

Hi, I want to remove a directory recursively except the inside directories calles .SYNC (designsync dirs) I am looking for something like: \rm -rf < find . * | grep -v .SYNC The find works ok but I do not know how to redirect it. Please help. Regards, Ziv:rolleyes: (1 Reply)
Discussion started by: zivsegal
1 Replies

9. Solaris

Java Exceptions while installing Oracle

Hello. I was trying to installe oracle 10g on solaris t0 x86 and got few exception? Could you please suggest, what might be going wrong? $ ls -l total 32 drwxr-xr-x 9 oracle dba 512 Nov 21 03:50 doc drwxr-xr-x 5 oracle dba 512 Nov 21 03:50 install drwxr-xr-x 2... (5 Replies)
Discussion started by: panchpan
5 Replies

10. Shell Programming and Scripting

exceptions in import

Hello, I want to import an Oracle database file on my fresh DB, bought before successfully with exp command. But is it possible to import some tables from the dmp file, because they are too large and it's so long !? I didn't find any option in imp command to make exception on certain tables...... (1 Reply)
Discussion started by: madmat
1 Replies
Login or Register to Ask a Question
elfdump(1)							   User Commands							elfdump(1)

NAME
elfdump - dumps selected parts of an object file SYNOPSIS
elfdump [-cCdegGhHiklmnprsuvy] [-N name] [-w file] filename... DESCRIPTION
The elfdump utility symbolically dumps selected parts of the specified object file(s). The options allow specific portions of the file to be displayed. The elfdump utility is similar in function to the dump(1) utility. The dump utility offers an older and less user-friendly interface than elfdump, although dump might be more appropriate for certain uses such as in shell scripts. Archive files, produced by ar(1), can also be inspected with elfdump. In this case, each object within the archive is processed using the options supplied. For a complete description of the displayed information, refer to the Linker and Libraries Guide. OPTIONS
The following options are supported: -c Dumps section header information. -C Demangles C++ symbol names. -d Dumps the contents of the .dynamic section. -e Dumps the ELF header. -g Dumps the contents of the .group section. -G Dumps the contents of the .got section. -h Dumps the contents of the .hash section. -H Dumps the contents of the .SUNW_cap hardware and software capabilities section. -i Dumps the contents of the .interp section. -k Calculates the ELF checksum. See gelf_checksum(3ELF). -l Displays long section names without truncation. -m Dumps the contents of the .SUNW_move section. -n Dumps the contents of the .note section. -N name Qualifies an option with a specific name. For example, in a file that contains more than one symbol table, the .dynsym ta- ble can be displayed using: example% elfdump -s -N .dynsym filename -p Dumps the program headers. -r Dumps the contents of the .rel[a] relocation sections. -s Dumps the contents of the .dynsym and .symtab symbol table sections. For archives, the archive symbol table is also dumped. Individual sections can be specified with the -N option. An archive symbol table can be specified using the special section name -N ARSYM. In the case of core files, the shndx field will have the value "unknown" since the field does not contain the valid values. In addition to the standard symbol table information, the version definition index of the symbol is also provided under the ver heading. -u Dumps the contents of a frame unwind. -v Dumps the contents of the .SUNW_version version sections. -w file Writes the contents of a section that is specified with the -N option, to the named file. For example, extracting the .text section of a file can be carried out with: example% elfdump -w text.out -N .text filename -y Dumps the contents of the .SUNW_syminfo section. OPERANDS
The following operand is supported: filename The name of the specified object file. FILES
liblddbg.so linker debugging library ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbtool | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
ar(1), dump(1), nm(1), pvs(1), elf(3ELF), attributes(5) Linker and Libraries Guide SunOS 5.10 4 Oct 2004 elfdump(1)