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.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Solaris
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
3. UNIX for Advanced & Expert Users
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
4. Shell Programming and Scripting
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
5. UNIX for Advanced & Expert Users
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
6. UNIX for Dummies Questions & Answers
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
7. Programming
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
8. IP Networking
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
sdfapi
SDFAPI(1) User Contributed Perl Documentation SDFAPI(1)
NAME
sdfapi - API Extraction Utility
PURPOSE
sdfapi extracts Application Programming Interface information from (Perl) source code.
USAGE
usage : sdfapi [-h[help]] [-o[out_ext]]
[-l[log_ext]] [-O[out_dir]] [-f fmt_tag]
[-p[pattern]] [-s sym_type,..] [-j]
file ...
purpose: extract the API from a (perl) library
version: 2.000 (SDF 2.001)
The options are:
Option Description
-h display help on options
-o output file extension
-l log file extension
-O output to input file's (or explicit) directory
-f output format tag
-p only symbols matching pattern
-s only symbols of these types
-j add SDF-style hypertext jumps from each symbol
DESCRIPTION
The -h option provides help. If it is specified without a parameter, a brief description of each option is displayed. To display the
attributes for an option, specify the option letter as a parameter.
By default, generated output goes to standard output. To direct output to a file per input file, use the -o option to specify an extension
for output files. If the -o option is specified without a parameter, an extension of out is assumed.
Likewise, error messages go to standard error by default. Use the -l option to create a log file per input file. If the -l option is
specified without a parameter, an extension of log is assumed.
By default, generated output and log files are created in the current directory. Use the -O option to specify an explicit output directory.
If the -O option is specified without a parameter, the input file's directory is used.
The format of the output can be controlled using the -f option. Supported formats are std and concise. The default is std. std format is:
require "abc.pl";
$myvar = ...
$result = &myfunc($myparams);
concise format has fewer blank lines and uses 1 line per symbol.
A comma-separated list of symbol types to output can be specified using the -s option. Supported symbol types are:
o sub - subroutines
o var - variables
The default is to extract all symbols.
The -p option is used to extract only a subset of the symbols. If not supplied, the pattern is symbols beginning with a letter. If supplied
without an option, the pattern defaults to all symbols. If perl libraries use the coding convention that symbols beginning with underscore
are private, then -p_ can be used to extract the private symbols.
The -j option can be used to request SDF-style hypertext jumps be added for each symbol. The jump target is lib_sym where:
o lib is the library name
o sym is the symbol name.
LIMITATIONS AND FUTURE DIRECTIONS
The only language currently supported is Perl.
It would be useful to extract messages from the scripts too. This would require a new utility called sdfmsg say, which searched through the
source (including libraries) for AppMsg and AppExit calls.
Internally, it may be better to implement formats via routines. This would give better control over output. e.g. it would be up to the
routine to decide if it wanted to output the 'require' header.
perl v5.12.4 2011-11-09 SDFAPI(1)