Sponsored Content
Top Forums Shell Programming and Scripting Matching using Regex inside a file Post 302374930 by blueblur on Thursday 26th of November 2009 01:54:09 AM
Old 11-26-2009
Quote:
Originally Posted by durden_tyler
How do 186 characters fit into this picture ?
- 186 characters before "http://" ? After "http://" ? Including "http://" ?
- Also, <= 186 characters ? Exactly 186 ? >= 186 ?
tyler_durden

-Exactly 186 char including "http://"
 

10 More Discussions You Might Find Interesting

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

2. Shell Programming and Scripting

regex inside if comparison

I'm trying to compare the last octet of an IP to a regex: IP=$(ifconfig eth0 | grep inet | awk -F: '{print $2}' | awk -F. '{print $4}' | awk '{print $1}') if ]; then echo "GOOD: Correct IP range for server" else echo "ERROR:... (6 Replies)
Discussion started by: s_becker
6 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

sed - print only matching regex

Hi folks, Lets say I have the following text file: name, lastname, 1234, name.lastname@test.com name1, lastname1, name2.lastname2@test.com, 2345 name, 3456, lastname, name3.lastname3@test.com 4567, name, lastname, name4.lastname4@test.com I now need the following output: 1234... (5 Replies)
Discussion started by: domi55
5 Replies

5. Shell Programming and Scripting

Perl: Regex, string matching

Hi, I've a logfile which i need to parse and get the logs depending upon the user input. here, i'm providing an option to enter the string which can be matched with the log entries. e.g. one of the logfile entry reads like this - $str = " mpgw(BLUESOAPFramework):... (6 Replies)
Discussion started by: butterfly20
6 Replies

6. Shell Programming and Scripting

Help with matching pattern inside a file

I have a huge file that has roughly 30304 lines. I need to extract specific info from that file. For example, Box 1 > *aaaaaaaajjjj* > hbbvjvj > jdnnfddllll > *dgdfhfekwjh* Box 2 > *aaaaaaa'aj'jjj* > dse hkjuejef bfdw > dyeee > dsewq > *dgdfhfekwjh* >feweiuei Box 3 > *aaaa"aaaaj"jjj* >... (25 Replies)
Discussion started by: Ernst
25 Replies

7. Shell Programming and Scripting

matching a regex using egrep not working

Hi, I'm trying to validate if a string matches a regular expression, but it is not working. Am I missing something? Do I need to scape any of the characters? if echo 'en-GB' | egrep '({1,8})(-{1,8})*' >/dev/null; then echo Valid value fi Thanks in advance (6 Replies)
Discussion started by: skrtxao
6 Replies

8. Shell Programming and Scripting

Renumber position 88-94 inside all files matching criteria inside folder

There are 4 files inside one folder matching criteria i.e. File name = ABCJmdmfbsjopXXXXXXX_mm-dd-yyyy_XXX.data Here is the Code which find the files matching criteria:- TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"` do # Matching File Processing Code.... (1 Reply)
Discussion started by: lancesunny
1 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 Dummies Questions & Answers

Regex matching column awk

Hi all, I want to extract rows with the pattern ALPHANUMERIC/ALPHANUMNERIC in the 2nd column. I dont wan rows with more than 1 slash or without any slash in 2nd column. a a/b b a/b/c c a/b//c d t/y e r f /f I came up with the regex grep '\/$' file a a/b b a/b/c d t/y (3 Replies)
Discussion started by: jianp83
3 Replies
NBP(1)							      General Commands Manual							    NBP(1)

NAME
nbplkup, nbprgstr, nbpunrgstr - access NBP database SYNOPSIS
nbplkup [ -r nresp ] [ nbpname ] nbprgstr [ -p port ] nbpname nbpunrgstr nbpname DESCRIPTION
nbprgstr registers nbpname with atalkd(8), at the given port. nbpunrgstr informs atalkd that nbpname is no longer to be advertised. nbplkup displays up to nresp (default 1000) entities registered on the AppleTalk internet. nbpname is parsed by nbp_name(3). An `=' for the object or type matches anything, and an `*' for zone means the local zone. The default values are taken from the NBPLKUP environment variable, parsed as an nbpname. EXAMPLE
Find all devices of type LaserWriter in the local zone. example% nbplkup :LaserWriter Petoskey:LaserWriter 7942.129:218 Gloucester:LaserWriter 8200.188:186 Rahway:LaserWriter 7942.2:138 517 Center:LaserWriter 7942.2:132 ionia:LaserWriter 7942.2:136 Evil DEC from Hell:LaserWriter 7942.2:130 Hamtramck:LaserWriter 7942.2:134 Iron Mountain :LaserWriter 7942.128:250 example% SEE ALSO
nbp_name(3), atalkd(8). netatalk 1.2 17 Dec 1991 NBP(1)
All times are GMT -4. The time now is 11:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy