Hi
Can somebody please help me know how do i match the basename using a regular expression using posix standard in shell script
suppose i want to match
/u01/Sybase/data/master.dbf the result should be master.dbf as i want to match everything after the last /
regards (8 Replies)
What do you think of this regex to match IP address? I have been reading up on regex and have seen some really long ones for IP. Would this fail in any scenarios?
(+\.){3}* (5 Replies)
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
Using these strings as an example:
<a onclick="doShowCHys=1;ShowWindowN(0,'/daman/man.php?asv4=145148&playTogether=True',960,540,943437);return false;" title="">
<a onclick="doShowCHys=1;ShowWindowN(0,'/daman/man.php?asv4=1451486&playTogether=True',960,540,94343);return false;" title="">
<a... (12 Replies)
Hi
We have a tool to monitor logs in our environment. The tool accepts log pattern match only using regex and I accept I am a n00b in that:confused:. I had been banging my head to make it work without much success and at last had to turn on to my last option to post it here. I had got great... (2 Replies)
Hi All,
I want to print all the occurrences for a particular pattern from a file. The catch is that the pattern search is partial and if any word in the file contains the pattern, that complete word has to be printed. If there are multiple words matching the pattern on a specific line, then all... (2 Replies)
I have a line that I need to parse through and extract a pattern that occurs multiple times in it.
Example line:
getInfoCall: info received please proceed, getInfoCall: info received please proceed, getInfoCall: info received please proceed, getInfoCall: info received please proceed,... (4 Replies)
The below bash connects to a site, downloads a file, searches that file based of user input - could be multiple (all that seems to work). What I am not able to figure out is how to display on the screen match found or no match found" and write a file to a directory (C:\Users\cmccabe\Desktop\wget)... (4 Replies)
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)
Hello Friends,
Can somebody assist an issue I am having? I have a separate file with a list of account ids
XXX200B02Y01
XXX200B03Y01
XXX200B05Y01
XXX200B07Y01
XXX200B08Y01
I call the file, and run an egrep against a directory and logfiles
AccountID=$(cat... (2 Replies)
Discussion started by: liketheshell
2 Replies
LEARN ABOUT DEBIAN
path::dispatcher::rule::tokens
Path::Dispatcher::Rule::Tokens(3pm) User Contributed Perl Documentation Path::Dispatcher::Rule::Tokens(3pm)NAME
Path::Dispatcher::Rule::Tokens - predicate is a list of tokens
SYNOPSIS
my $rule = Path::Dispatcher::Rule::Tokens->new(
tokens => [ "comment", "show", qr/^d+$/ ],
delimiter => '/',
block => sub { display_comment(shift->pos(3)) },
);
$rule->match("/comment/show/25");
DESCRIPTION
Rules of this class use a list of tokens to match the path.
ATTRIBUTES
tokens
Each token can be a literal string, a regular expression, or a list of either (which are taken to mean alternations). For example, the
tokens:
[ 'ticket', [ 'show', 'display' ], [ qr/^d+$/, qr/^#w{3}/ ] ]
first matches "ticket". Then, the next token must be "show" or "display". The final token must be a number or a pound sign followed by
three word characters.
The results are the tokens in the original string, as they were matched. If you have three tokens, then "match->pos(1)" will be the
string's first token ("ticket"), "match->pos(2)" its second ("display"), and "match->pos(3)" its third ("#AAA").
Capture groups inside a regex token are completely ignored.
delimiter
A string that is used to tokenize the path. The delimiter must be a string because prefix matches use "join" on unmatched tokens to return
the leftover path. In the future this may be extended to support having a regex delimiter.
The default is a space, but if you're matching URLs you probably want to change this to a slash.
case_sensitive
Decide whether the rule matching is case sensitive. Default is 1, case sensitive matching.
perl v5.12.4 2011-08-30 Path::Dispatcher::Rule::Tokens(3pm)