![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl question regarding [ ] | hankooknara | Shell Programming and Scripting | 2 | 07-01-2007 04:21 PM |
| Perl Question | serm | Shell Programming and Scripting | 2 | 09-28-2006 05:50 AM |
| perl question | BG_JrAdmin | Shell Programming and Scripting | 1 | 09-09-2005 07:46 PM |
| PERL question | frank | Shell Programming and Scripting | 1 | 06-18-2002 03:13 AM |
| Perl question | Jubba | Shell Programming and Scripting | 1 | 04-01-2002 02:24 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I do not know perl but need to know what the following conditional statement says. Can someone help ?
if (/ \S+@\S+\.\S+ accepted $| \S+\/\S+ accepted $/) { next; } elsif (/ (\S+)\.\S+\.\S+\.\S+ \S+ \S+ \S+ \S+ \S+ (\S+)\.\S+\.(\S+)\.\S+ \S+ User (\S+) accepted $/) { ... I think it says if some string separted by '@" plus some string and the word accepted OR some string separated with an '/' plus remaining string then skip ( next ) else some series of strings ( have no idea what all that means ) having User ( then something ???) and accepted then do processing ... ??? thanks Last edited by Gary Dunn; 12-02-2004 at 05:59 PM.. |
|
||||
|
The first match looks like matching some email address or file path in a message.
The second matches some string delimited by . (dot). It should serve some extraction from fixed columns but I won't know what it is trying to match. \S means a non-whitespace character, so anything other than tab, space, etc. will match. \. is a dot, and () means to backtrack a matched expression so that the matched content will be accessible in some later statements. Actually, you should be able to find out more about Perl regular expressions in the perlre manpage. |
![]() |
| Bookmarks |
| Tags |
| regex, regular expressions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|