10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
Trying to find out how to discover if the first 2 characters of a string are "22"
Not sure how.
I could use
if ]; then echo "yes";fi
But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Discussion started by: newbie2010
5 Replies
3. Shell Programming and Scripting
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Discussion started by: briandanielz
4 Replies
4. Shell Programming and Scripting
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)
Discussion started by: metallica1973
12 Replies
5. Shell Programming and Scripting
Hi All
I am new to this forum and also regex.
I am using bash scripting and have a file like this
"0012","efgh","12345678","adfdf", "36598745"
"87654321","hijk","lmno"
I want the ouput to be
12345678
36598745
87654321
Criteria like this
- number
- 8 carachters long
Please let... (21 Replies)
Discussion started by: buttseire
21 Replies
6. Shell Programming and Scripting
Hi,
I just need to check whether number of digits in a phone number is 10 or not. If I am not wrong regex will be: {9}
I have to use this inside nawk as this is a small portion of a big program.
nawk '
BEGIN { RS="";FS=";";
regex="{9}";
}
{
for (i=1;i<=NF;i++) {
if... (6 Replies)
Discussion started by: shekhar2010us
6 Replies
7. UNIX for Advanced & Expert Users
Hello,
I need to construct a pattern to match the below string (especially the timestamp at the beginning)
20101222100436_temp.dat
The below pattern works _temp.dat
However I am trying find if there are any other better representations.
I tried {14}, but it did not work.
I am on... (5 Replies)
Discussion started by: krishmaths
5 Replies
8. UNIX for Advanced & Expert Users
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)
Discussion started by: glev2005
5 Replies
9. Shell Programming and Scripting
I have a log file that ends in a ".xxx" where xxx are digits but I don't necessarily know what digits they are. The log file rotates automatically and is auto-incrementing - starting at .001.
So the example would be:
file-name.005
If the file ends in .005 and the log rotates, it logically... (2 Replies)
Discussion started by: sdutto01
2 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
Does anybody know how the command to compare today's date with a unix file's date? (3 Replies)
Discussion started by: poohxiong
3 Replies