Fedora :: Regular Expressions And E-mail Validation?

Jan 12, 2010

The * would not have to be because it means everything [az] [0-9 ][$%&!"/()=?'=) but not how to solve[URL]..

ls [0-9a-zA-Z]*[@]*[gmail | yahoo | hotmail]*[.]*[com]
ls [0-9a-zA-Z][.-_][0-9a-zA-Z]*[@]*[gmail | yahoo | hotmail]*[.]*[com]

View 2 Replies


ADVERTISEMENT

Ubuntu :: How Do I Use Regular Expressions

Aug 15, 2010

I want to use regular expressions and sed to remove html tags from a text file.

View 2 Replies View Related

Ubuntu :: MP3 Metadata With Regular Expressions?

Mar 29, 2010

how a way that I can edit the metadata tags on some MP3s using regex?

I've got almost 100 MP3, all named "01 - <song title>," "02 - <song title>," etc., and I, understandably, don't want to edit them all by hand.

Running "s/d{2} - //g" would be so much easier.

View 4 Replies View Related

General :: Using Wc And Grep With Regular Expressions?

Apr 16, 2010

I'm writing a program that works with text files, and I'm trying to create some filters with grep. I have various questions here, so I'll number them for clarity.

1) First of all, I'd like to know what wc -w is actually returning. The word count is less than what gedit is counting in Document Statistics, so obviously gedit is counting something (like newlines) that wc -w is not

2) Secondly, I was wondering if there was a way to grep x number of words. I'm looking for something like the -m option, but returning a certain number of words instead of lines. For example, to find the first 2000 words, do something like grep -someoption 2000 ".*" or using {1,2000}.

3) Finally, I'm trying to filter out headers and footers of a text file but having no luck. The text files are Project Gutenberg files, so they have standardized headers and footers. Here's an example: [URL]...

The header starts with "The Project Gutenberg EBook of" and ends with the line containing "START OF THIS PROJECT GUTENBERG EBOOK" The footers begin with: "End of the Project Gutenberg EBook of" My problem is, grep can find:

[Code]...

View 15 Replies View Related

Software :: Library For Regular Expressions In C++?

Mar 26, 2011

I've began to develop with C++ (Eclipse+Qt) and the first problem I see is that there is not good functions for manipulating strings. if there is a library for manipulating strings with regular expressions?

View 1 Replies View Related

Programming :: Ant Build.xml And Regular Expressions?

May 31, 2011

i am trying to create an exclude regular expression for my build.xml. The problem is, that i am trying to find some info on which REs are acceptable/valid for ant... Is ant using standard regular expressions? POSIX ones? Since it is a java-based tool, the "Java REs" are probably valid. I am a little bit confused. If somebody can help me out with the different RE standards, i would be most obliged.

View 1 Replies View Related

Programming :: Using Regular Expressions With Find?

Mar 17, 2010

Gidday, I'm puzzled as to why this works:

Code:
find /Data/ -type f -iname "*7pm*"
But this doesn't:
Code:
find /Data/ -type f -regex *7[Pp][Mm]*

I've tried MANY variations, but I'm getting no error messages, just no returns, and yet the first find, will find the sorts of files I'm looking for. I realise a win is a win, but I'm of the understanding that the -regex switch allows for some really complex use of regular expressions - but I can't even get a very simple one to work,

View 4 Replies View Related

General :: Terminal - Using Regular Expressions With Grep

Aug 3, 2011

I can't get this simple regular expression to work for matching emails: 'w*(?:.w*)*@w*(?:.w*)*w{2,5}'

It should be working as I have tested it with regex pal and it works just fine. I think there's a problem with optional character class but I'm not sure.

View 1 Replies View Related

General :: Regular Expressions In Batch Script?

May 5, 2010

I am pretty new at this topic but I would like to learn it from example. The first thing I am working on is to modify the command date to be shown as DD/MM/YY only using regular expression but I dont know how to combine what there is in the regexp tutorials online and the syntax for batch scripting. Any help?

Here is what I what.
run a file test: ~# ./test
Where file test is:
#!/bin/bash
#
DATE=$( date )

[Code]..

Also if you can point me to good regexp tutorials (directed towards batch scripting), that will be great.

View 8 Replies View Related

General :: Difference Between Regular Expressions And Globbing?

Aug 26, 2010

As the subject says, can anyone explain to me what is the difference between Regular Expressions and Globbing?

View 9 Replies View Related

Software :: Make Vim Use Extended Regular Expressions?

Jun 8, 2010

How do I make Vim use extended regular expressions?

I really wish I wouldn't have to use all these ugly backslashes to do backreferences.

View 3 Replies View Related

Ubuntu :: Point To A Two-digit Interval With Regular Expressions?

Sep 9, 2010

Is it possible to point to a two-digit interval with regular expressions?

Background:
I'm using mplayer to watch tv shows, that often have episode numbers in their names. I know how to easily add several files to the playlist by using brackets, by typing something like
$ mplayer tv/South.Park.S1.E0[1-5]*avi

Is there a way to point to files 06-13 in a single expression?

View 2 Replies View Related

General :: Process Multi-line Regular Expressions?

Feb 23, 2010

How to make tools like sed operate on the whole file, instead of line-by-line?

View 14 Replies View Related

General :: Regular Expressions Match 2 File Names?

Nov 20, 2010

How can we do a simple match by regular expressions on two filenames. I plan to use it in the command 'find -regex'

Code:
hosts.txt
ipaddress.txt

View 4 Replies View Related

General :: Delete Files On The Command Line With Regular Expressions?

May 6, 2010

Lets say I have 20 files named FOOXX, where XX is the number of the file, eg 01, 02 etc. At the moment, if I want to delete all files lower than the number 10, this is easy and I just use a wildcard, eg rm FOO0* However, if I want to delete specific files ina range, eg 13-15, this becomes more difficult. rm FPP[13-15] does not work, and asks me if I wish to delete all files. Likewse rm FOO1[3-5] wishes to delete all files that begin with FOO1 So, what is the best way to delete ranges of files like this? I have tried with both bash and zsh, and I don't think they differ so much for such a basic task?

View 2 Replies View Related

Server :: Case Statement With Regular Expressions - Date Manipulation Script

Aug 19, 2010

Here's my need:
If Calendar Day= Then FCPeriod= And FCYear=
Jan 11 to Feb 1002Current Year of Feb 10
Feb 11 to Mar 1003Current Year of Mar 10
Mar 11 to Apr 1004Current Year of Apr 10
Apr 11 to May 1005Current Year of May 10
May 11 to June 1006Current Year of June 10
June 11 to July 1007Current Year of July 10
July 11 to Aug 1008Current Year of Aug 10
Aug 11 to Sept 1009Current Year of Sept 10
Sept 11 to Oct 1010Current Year of Oct 10
Oct 11 to Nov 1011Current Year of Nov 10
Nov 11 to Dec 1012Current Year of Dec 10
Dec 11 to Jan 1001* Current Year of Jan 10

* Note for Dec 11 - Dec 31,
The Next Year to be used
IE: Current date is Dec 28th, 2010. Year = 2011
IE: Current date is Jan 8th, 2011, Year = 2011.
Looks like I'll need a case statement with some regular expressions...

View 9 Replies View Related

Programming :: Java Regex - Use Regular Expressions Find Out What The First Two Characters Of The String Are

Feb 2, 2011

What I am doing is reading the text from a text document and storing all of the text inside of a ArrayList. I then set one of the values of the Arraylist as a string. I want to use regular expressions find out what the first two characters of the String are. if first two characters = "//" then function(); I only care about the first two characters though. If you need any more information, just ask.

View 4 Replies View Related

Ubuntu :: Get Offline Web Validation Apps?

Apr 22, 2010

I've just finished my 100% total move from Windows after 2 years of developing on two different systems, one Slackware and one XP. I have come away from Slack because it was just taking too long to maintain the rapid advances in development tools and have now moved onto Ubuntu full time.

The last tool I was using on Windows was Dreamweaver, and not for editing (I had Bluefish for that) but for the HTML validation that worked offline. Thing is, I now can't find anything similar on Ubuntu. I've no idea how to get the W3C Validators working offline and the last two add-ons I tried with Firefox didn't work. Anybody know of any packages with reliable HTML and CSS validation that works offline? An offline link checker would also be useful.

View 1 Replies View Related

General :: NS2 - Some Validation Tests Failed

Jun 11, 2009

After many modifications, I managed to install ns2.28 , but some validation tests failed. I got the following message at the end of validation test:

validate overall report: some tests failed:
./test-all-simple ./test-all-tcp ./test-all-testReno ./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-sack-full ./test-all-tcpVariants ./test-all-LimTransmit ./test-all-aimd ./test-all-greis ./test-all-rfc2581 ./test-all-sctp ./test-all-tcpHighspeed ./test-all-frto ./test-all-friendly ./test-all-srm ./test-all-realaudio ./test-all-ecn ./test-all-ecn-full ./test-all-quickstart ./test-all-hier-routing ./test-all-lan ./test-all-mcast ./test-all-vc ./test-all-mixmode ./test-all-red ./test-all-adaptive-red ./test-all-red-pd ./test-all-rio ./test-all-vq ./test-all-rem ./test-all-gk ./test-all-pi ./test-all-cbq ./test-all-schedule ./test-all-jobs ./test-all-intserv
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME

Notice that some tests in webcache will fail on freebsd when -O is turned on. This is due to some event reordering, which will disappear when -g is turned on. I tried to run the test individually one after another, but that is too time consuming, it prompts for permission after every test and thus runs many test & opens a lot of xgraph window. The tests I run so far individually, agreed with the reference output. Now I am wondering, should I report a bug about it, or should I hire a kid to run those failed 40 tests( which require hitting the ENTER key 1200 times,maybe ), or what else should I do.

View 14 Replies View Related

Security :: End User Validation Using Squid

May 24, 2009

This question is regarding squid based security. We would like to enforce browser security onto our users and would like to know if anyone has performed this. Our goal is to check a users browser version/plugin level before allowing them to access the internet in our organization. If their browser does not meet a standard compliance level such as patches or if they are using i.e. 5.0 we would redirect them to a page telling them that they need to update their browser before access will be permitted. Has anyone performed any types of checks like these?

View 4 Replies View Related

Programming :: Form Field Validation Using PHP

Sep 10, 2009

I want to validate a web form using PHP. I spent ages confusing myself with client side scripting and realised until I worked out it is not what I want. My problem is that now I am looking at PHP and everything is mixed up in my brain. I need to point out that PHP is very new to me! This is what I already have:
1 An html page with my form on it.
2 PHP page which emails the contents of the form to me.

The above works well. For the sake of clarity, here are my pages (cut down to the essentials where appropriate): My html form:
first name surname
Email  
Home phone
Mobile
Work phone

I have read and understood your terms and conditions. My php script (regform.php)
$receiver = 'me@email'; $subject = 'New registration'; #$message = 'This is a new registration.'; $surname = $_POST['surname']; $firstname = $_POST['firstname']; $address = $_POST['address']; $email = $_POST['email']; $homeph = $_POST['homeph']; $mobileph = $_POST['mobileph']; $workph = $_POST['workph']; $time = $_POST['time']; #from here $oldaddress = $_POST['oldaddress']; $DOB = $_POST['DOB']; $elect = $_POST['elect']; $job = $_POST['job']; $salary = $_POST['salary']; $employer = $_POST['employer']; $benefit = $_POST['benefit']; $smoke = $_POST['smoke']; $claim = $_POST['claim']; $children = $_POST['children']; $children2 = $_POST['children2']; $pets = $_POST['pets']; $pets2 = $_POST['pets2']; $require = $_POST['require']; $terms = $_POST['terms']; $rooms = $_POST['rooms']; $body = "first name:$firstname
surname:$surname
DOB:$DOB
email:$email
home phone:$homeph
mobile phone:$mobileph
work phone:$workph
address:
$address
time at this address:$time
previous address:$oldaddress
electoral register:$elect
employment:$job
employer:$employer
salary:$salary
benefit claim:$benefit
future benefit:$claim
children:$children
ages:$children2
pets:$pet
pet type:$pets2
other requirements:$require
terms:$terms"; $headers = 'From: email' . "
" . 'Reply-To: email "
" . 'X-Mailer: PHP/' . phpversion(); mail($receiver, $subject, $body, $headers, "From: $firstname $surname
" . "Reply-To: $firstname $surname class="inlineimg" />;

You can see there are many more form fields than I have shown in my example html form above. What I want is that the following fields have to be filled:
1 mobileph
2 email
3 terms (checkbox)
I would like the user to be asked to fill the form in properly if any/all of the 3 fields have not been filled in. I imagine I need some php in the html page and some more in the php page. I am certainly not asking any one to do this for me but I am really confused. I have googled and copied and pasted and edited for 6 hours and I am lost. What I want is a very simple and clear example of the code needed. Sorry if I sound as if I can't search properly on Google: in this case I clearly can't!

View 2 Replies View Related

Ubuntu :: Quick Command Line Validation?

Dec 17, 2010

sudo mkdir /etc/adobe=(created a directory in /etc named Adobe)correct?echo "OverrideGPUValidation=true" >~/mms.cfg=(created a text file in my Home directory named mms.cfg which contained the text...OverrideGPUValidation=true...correct?sudo mv ~/mms.cfg /etc/adobe/=(moved from my Home directory to /etc/adobe mms.cfg) correct?These commands were part of a flash tutorial but they did not work.So I cd'd into etc and using sudo tried rm -r /adobe. Basically Iwant to undo what those 3 commands did.Link to tutorial=(Flash in fullscreen is choppy, completely white or crashes)[URL]

View 4 Replies View Related

General :: Validation Failed In NS2.34 In Ubuntu 10.04 64bit

May 11, 2011

I have just installed NS2.34 in my Ubutun 10.04. I have installed it successfully, but I got some failures in validation.

Validate overall report: all portable tests passed but some non-portable tests failed:
./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma

I read the post of [SOLVED] Validation failed in NS2.34 in ubuntu 10.04 remix and followed the steps there. But, the same problem remains. I think the problem may be due to my 64-bit operating system.

View 2 Replies View Related

General :: Validation Failed In NS2.34 In Ubuntu 10.04 Remix

Aug 28, 2010

I have installed Ubuntu 10.04 remix in my new hp mini 110 netbook and I have succeeded in installing NS2.34 after a so many trials but now after running ./validate some of the tests have failed. Is my ns2 installation not successful?

Some non-portable tests also failed:
./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-simultaneous ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma ./test-all-satellite to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME

View 6 Replies View Related

Programming :: If Test Validation - Using Char Arrays

Jun 9, 2010

I'm writing a code to get the index of the last occurrence of a given substring in a string.

Code:
int StringHandler::lastIndexOf(string src, const string s) {
unsigned int lastIndex = string::npos;
if (src.find(s, 0) == string::npos) {
return -1; } else {
bool isLast = false; unsigned int i = 0; do {
lastIndex = src.find(s, i);
if (lastIndex != string::npos) { i = lastIndex + 1;
if (i == src.size()) { isLast = true;
} } else { isLast = true;
} } while (!isLast);
} return lastIndex;
}

My problem is: execution steps into an if with a false condition! Check the values of i and src.size() at the right panel. How could be possible for the program to run the highlighted statement? The if condition above is false! [URL]. I could use char arrays, for example, but this kind of false validation has happened to me more than once, I'm using G++ 4.5 with these flags: -O0 -g -Wall -c

View 3 Replies View Related

Fedora Installation :: Newaliases - Root's Mail Is Not Showing Up In My Local Mail Inbox ?

Jun 14, 2009

I just added my login id to /etc/aliases to forward root's local e-mail to my local e-mail account in evolution.

As always, when I make a change to /etc/aliases, I run newaliases. I now get the following, and root's mail is not showing up in my local mail Inbox:

Code:

Is this correct?

I understand my hostname (i.e., Eng-Lab-010) is not a fully qualified host name, but I never had a problem before. But it appears this not a good thing. What should I do?

View 4 Replies View Related

Fedora :: Unable To Connect From Clients Computers To Mail Server For Receiving Mail?

Oct 15, 2009

I have installed F11 on my server bythis article! I have problem with certificatewhen I connectin from clients computers to my mail server for reciving mail! I have warning like this

View 2 Replies View Related

Programming :: Perl Script - Phone Number Validation

Apr 1, 2010

I am doing a perl script validation for Phone numbers. The normal phone number format is 01-32145. I need to do two validations for the phone number

1) A valid phone number can have at least two digits as prefix and at least five digits as postfix. e.g. 01-01011
2) A valid phnoe number can't contain only the digit "0" in either area code or phone number e.g. 00-11111 or 01-00000 is not allowed.

I am able to do the first validation, but not the second. I am pasting my code part here. How to add the second validation inside my current code.

open(TMPOUTPUT, "<$tmp_output_file") or die "Can't open output";
open(OUTPUT, ">$output_file") or die "Can't open output";
while ($line = <TMPOUTPUT>) { $line =~ s/ +
//; ($cur_phone, $xxxxxx, $xxxxxx) = split(";", $line);
($cur_phone_prefix, $cur_phone_postfix) = split("-", $cur_phone);
$length_prefix = length ($cur_phone_prefix);
$length_postfix = length ($cur_phone_postfix);
if ($length_prefix < 2 || $length_postfix < 5 ) {
print "Invalid phone number: $cur_phone ";
} else { print "Valid phone number: $cur_phone ";
} } close TMPOUTPUT; close OUTPUT;

View 9 Replies View Related

Programming :: Data Validation - Input Contains Digits And Certain Alphabets

Apr 8, 2010

I am having a huge problem checking the data I input to make sure it is correct. What I am trying to achieve is when I input a value, it will check if the input is all digits and if it is not, check to see if it contains certain alphabets. Thus for example, if I were to input in data such as "11A" , the program will then inform me "There is an important alphabet in the program." This would be my expected output. Here is the program I have wrote...

Code:
int test(string r ){ const int arraySize = 10;
char array2[arraySize2] ={'A','B','E','F','G','H','J','K','N','O','P','Q','R','S','T','U','W','Y','Z'};
for(int cntr = 0; cntr <r.length(); cntr++)
if(!isdigit(r[cntr])){ for(int new1 =0; new1<arraySize2;new1++)
for(int cntr1 = 0; cntr1 <r.length(); cntr1++)
if(array2[new1] == r[cntr1]){ return 2; //will return2 when it finds the same
// char in the array and the string r. } else{ return 3;
//will return 3 when there is a char
//in the string which isnt in the array
} } else { return 1; // will return 1 when string is all digit.
} int main() { string r = "11D"; test(r);
if(test(r) == 1) { cout << "ALL ARE DIGITS" << endl;
} if (test(r)== 2) {
cout << "There is an important alphabet in the program." << endl;
} if (test(r)== 3) { // testRoman(r);
cout << "There is an Alphabet in the String which is not in the Array" << endl;
} }

So, the problem I am facing is when I input in data such as 11 or A , the prog will come out the right input. But if I were to put in data such as "11A" , the output coming out will be "ALL ARE DIGITS". The problem which causes this seems to be in the return statement , as once as it finds the first char which is a digit, it will then return 1 and not continue checking the rest of the string. Is there a way I can stop or continue a loop if it has met the condition I stated? What I can do or any other way available for me to check my input?

View 4 Replies View Related

Fedora Installation :: LVM Vs Regular Partitions

Jun 24, 2009

I am happily running Fedora 8 on my Inspiron 6400 Laptop. I am looking to upgrade to Fedora 11 soon, and had a partitioning question.

Currently my disk looks like this:

My question has to do with using LVM's in Fedora... What are the benefits of LVM vs just regular partitions (even though in F11 they are ext4 ) ? Does it make mounting the drives from a live CD or backing up partitions more difficult? I use PartImage to backup the entire partition... with this work with LVM?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved