Hello again, monks. This time I need some help about Regular Expressions. Lame of me, but I still can`t get the 'source' of it... I require a simple and small explanation about them with my few regex needs here is some:
Validate me a mail but it should be aware of:
*johnsmith@yahoo.com
hello12@.com
hello@gmail..com
etc.
Please, write me a good example with appropriate comments to see how these regexes are working since I just can`t get it.
Well, thanks for replying I am getting the hang of it reading some books, here is one of my tests about simple html tag checking:
#!/usr/bin/perl
use warnings;
use strict;
while (<DATA>) {
if ( /<hr( +size *=? *[0-9]+ *(\/>|>)| +\/>|>)/i ) {
print;
}
}
__DATA__
<hr size==12 />
<hr size = 12 />#!/usr/bin/perl
use warnings;
use strict;
while (<DATA>) {
if ( /<hr( +size *=? *[0-9]+ *(\/>|>)| +\/>|>)/i ) {
print;
}
}
__DATA__
<hr size==12 />
<hr size = 12 />
<hr size=14>
<hr>
<hr >
<hr />
<hr size />
<hr size=14>
<hr>
<hr >
<hr />
<hr size />
This is a fair good match I`ve made for horizontal lines tags with regexes :)