On Wed, Oct 19, 2011 at 1:10 AM, Leo Susanto wrote:
> use strict;
> my %CELL;
> my %CELL_TYPE_COUNT;
> my $timestamp;
> my $hour;
> while (my $line = ) {
>if ($line =~ m|\d{1,2}/\d{1,2}/\d{2} ((\d{1,2}):\d{1,2}:\d{1,2})|) {
> #10/17/11 18:25:20 #578030
>$timestamp = $1;
>
On 10/28/11 Fri Oct 28, 2011 2:15 PM, "Chris Stinemetz"
scribbled:
> On Wed, Oct 19, 2011 at 1:10 AM, Leo Susanto wrote:
>
>> use strict;
>> my %CELL;
>> my %CELL_TYPE_COUNT;
>> my $timestamp;
>> my $hour;
>> while (my $line = ) {
>>if ($line =~ m|\d{1,2}/\d{1,2}/\d{2} ((\d{1,2}):\d{1
On Sat, Dec 22, 2012 at 04:45:21PM +0530, punit jain wrote:
> Hi,
>
> I have a file like below : -
>
> BEGIN:VCARD
> VERSION:2.1
> EMAIL:te...@test.com
> FN:test1
> REV:20101116T030833Z
> UID:644938456.1419.
> END:VCARD
>
> >From <>(S___-0003) Tue Nov 16 03:10:15 2010
> content-class
On Sat, 22 Dec 2012 16:45:21 +0530
punit jain wrote:
> Hi,
>
> I have a file like below : -
[snipped example - vcards with mail headers etc in between]
> My requirement is to get all text between BEGIN:VCARD and END:VCARD
> and all the instances. So o/p should be :-
[...]
> I am using below r
On 22/12/2012 11:15, punit jain wrote:
Hi,
I have a file like below : -
BEGIN:VCARD
VERSION:2.1
EMAIL:te...@test.com
FN:test1
REV:20101116T030833Z
UID:644938456.1419.
END:VCARD
From <>(S___-0003) Tue Nov 16 03:10:15 2010
content-class: urn:content-classes:person
Date: Tue, 16 Nov
Hi ,
I have a file as below : -
{
test = ("test123");
test = ("test123","abc");
test = ("test123","abc","xyz");
}
{
test1 = ("passfile");
test1 = ("passfile","pasfile1");
test1 = ("passfile","pasfile1","user");
}
and so on
The requirement is to have the file parsing so that final output is
Im not sure if this is possible but i want to delete all chars inbeteen
< and > so if i had id like to delete it,
Here an example of the best way i can figure out how to do it :)
$string =~ s/\<.\>|\<..\>|\<...\>|\<\>|\<..\>//
so I'm looking for a shorter way, I cant find any wildcards
Hi Rajeev,
I'm not sure why you feel the need to join your buffer into a big string.
>From what you describe couldn't you just process each buffer element one by
one?
foreach my $buffer_entry (@buff) {
if($buffer_entry =~ /(FastEthernet|down)/i) {
print $buffer_entry;
}
}
Let us
will send a bigger mail.
Regards
Rajeev
-Original Message-
From: Rob Anderson [mailto:[EMAIL PROTECTED]
Sent: Friday, July 11, 2003 3:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Need Regex help !!
Hi Rajeev,
I'm not sure why you feel the need to join your buffer into a big string.
>From
Pandey Rajeev-A19514 wrote:
>
> Rob ANderson wrote:
> >
> > Pandey Rajeev-A19514 wrote:
> > >
> > > In short, I have a defined set of pattern that can occur across any number of
> > > lines(scalars) in a buffer (array of scalars)
and I need to print only those lines(Scalars) that contain the full
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Pandey Rajeev-A19514 wrote:
>>
>> Rob ANderson wrote:
>> >
>> > Pandey Rajeev-A19514 wrote:
>> > >
>> > > In short, I have a defined set of pattern that can occur across any
>> > > number of lines(scalars) in a buffer (array of scalars)
> and I ne
On Sep 6, Mike Singleton said:
>1. replace all spaces with commas
$str =~ s/\s/,/g;
or
$str =~ tr/\n\r\t\f /,/;
>2. strip all information before the date
You probably want something like
($keep) = $str =~ /(\w{3} \w{3} .*)/;
This assumes the date is going to be the first occurrence o
perldoc -f length
http://danconia.org
On Wed, 20 Nov 2002 16:03:35 +0100, Marco Centemeri <[EMAIL PROTECTED]> wrote:
> Hi All!!
>
> How can I know if a variable is exactly 6 digit long?
>
> I tried:
>
>$myvar='ABCDEF';
>if ($myvar =~ /
On Nov 20, Marco Centemeri said:
>How can I know if a variable is exactly 6 digit long?
if ($str =~ /\A\d{6}\z/) { ... }
The \A matches the beginning of the string, \d{6} matches 6 digits, and
the \z matches the end of the string.
If you meant "characters" instead of "digits", don't use a reg
ta = split(/|/,$_);
}
-Original Message-
From: Balint, Jess [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 12:56 PM
To: '[EMAIL PROTECTED]'
Subject: Regex Help Please!?
Hello all. I am trying to 'code' an address into a certain format. The
format is as follows:
firs
You will need to escape the | as \| otherwise won't do what you
think. I checked to make sure.
Wags ;)
-Original Message-
From: Tom Stewart [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 11:18
To: Balint, Jess; [EMAIL PROTECTED]
Subject: RE: Regex Help Please!?
Jess Balint wrote:
>
> Hello all. I am trying to 'code' an address into a certain format. The
> format is as follows:
>
> first 4 digits of street #
> first 4 street name
> first 2 of address line 2
> first 3 of zip code
>
> The data is a pipe delimited file with the following format:
>
> cons
Couldn't it be:
m#^([^\\/]+)(.*)([^\\/]+)$# )
At Thursday, 31 January 2002, [EMAIL PROTECTED] wrote:
>I know this is not a good RegEx. Can I see some criticism and fine-
tuning of
>this RegEx that I came up with?
>
>Objective: To parse the path to drive, directory and file name.
>
>Here is wha
--- [EMAIL PROTECTED] wrote:
> I know this is not a good RegEx. Can I see some criticism and fine-tuning of
> this RegEx that I came up with?
>
> Objective: To parse the path to drive, directory and file name.
>
> Here is what I came up with.
>
> #
> $fullpath =
: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Regex help Please...
--- [EMAIL PROTECTED] wrote:
> I know this is not a good RegEx. Can I see some criticism and fine-tuning
of
> this RegEx that I came up with?
>
> Objective: To parse the path to drive, directory and file name.
On Mon, 2008-08-11 at 14:02 -0700, Saya wrote:
> Hi,
>
> I have the following issue:
>
> my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/
> web-media/images/bday-after-help.jpg,javascript:popUp('/pop-ups/
> birthday/main.html','bday-pics',785,460);"
>
> Now I want $s to be l
Saya wrote:
>
> I have the following issue:
>
> my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/
> web-media/images/bday-after-help.jpg,javascript:popUp('/pop-ups/
> birthday/main.html','bday-pics',785,460);"
>
> Now I want $s to be like: "/metadata-files/test-desc.txt,/meta
Mr. Shawn H. Corey wrote:
> On Mon, 2008-08-11 at 14:02 -0700, Saya wrote:
>>
>> I have the following issue:
>>
>> my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/
>> web-media/images/bday-after-help.jpg,javascript:popUp('/pop-ups/
>> birthday/main.html','bday-pics',785,460);"
On Mon, 2008-08-11 at 23:30 +0100, Rob Dixon wrote:
> Mr. Shawn H. Corey wrote:
> > On Mon, 2008-08-11 at 14:02 -0700, Saya wrote:
> >>
> >> I have the following issue:
> >>
> >> my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/
> >> web-media/images/bday-after-help.jpg,javascri
Mr. Shawn H. Corey wrote:
> On Mon, 2008-08-11 at 23:30 +0100, Rob Dixon wrote:
>> Mr. Shawn H. Corey wrote:
>>> On Mon, 2008-08-11 at 14:02 -0700, Saya wrote:
I have the following issue:
my $s = "/metadata-files/test-desc.txt,/metadata-files/birthday.txt,/
web-media/images
On Wed, 27 Sep 2006 13:11:17 -0600
"Gerald Wheeler" <[EMAIL PROTECTED]> wrote:
> I am looking for: ab1in line1
> and looking for: ab2 in line 2
>
> actually ab1 and ab2 immediately follow the last "/" (there are
> numerous "/" on the line (w/o quotes))
>
> These are not working. can som
On 9/27/06, Owen <[EMAIL PROTECTED]> wrote:
On Wed, 27 Sep 2006 13:11:17 -0600
"Gerald Wheeler" <[EMAIL PROTECTED]> wrote:
> I am looking for: ab1in line1
> and looking for: ab2 in line 2
>
> actually ab1 and ab2 immediately follow the last "/" (there are
> numerous "/" on the line (w/o
Omega -1911 am Freitag, 1. Dezember 2006 06:05:
> Hello all,
>
> I am trying to parse calendar events for a rss feed into variables. Can
> someone help with building the following regex or point me in the direction
> of some good examples? Thanks in advance.
>
> Here is what I have tried: (I don't
Omega -1911 wrote:
Hello all,
I am trying to parse calendar events for a rss feed into variables. Can
someone help with building the following regex or point me in the direction
of some good examples? Thanks in advance.
Here is what I have tried: (I don't know much about complex regex's as you
Hi Rob & Dani,
Thanks for your help!!! I will try the suggestion you made Rob and as soon
as I finish typing this, I'll try Dani's code. I had someone by the name of
Chen Ken contact me off-list and provided me with the following regex that
appeared to work. Please let me know what you think:
my
Omega -1911 am Freitag, 1. Dezember 2006 19:01:
> Hi Rob & Dani,
Hello Omega
> Thanks for your help!!! I will try the suggestion you made Rob and as soon
> as I finish typing this, I'll try Dani's code. I had someone
> contact me off-list and provided me with the following regex that
> appeared
Omega -1911 wrote:
Hi Rob & Dani,
Thanks for your help!!! I will try the suggestion you made Rob and as soon
as I finish typing this, I'll try Dani's code. I had someone by the name of
Chen Ken contact me off-list and provided me with the following regex that
appeared to work. Please let me kno
Jason Balicki wrote:
> This should be a quickie, I hope:
>
> I'm parsing an array that contains things like Zap/1 Zap/2 Zap/3 ... etc.
>
> I'm only concerned with Zap/32 - Zap/47.
>
> Will this work:
>
> if (($zapdef eq "Zap/*") and ($zapdef eq
> "*[32|33|34|35|36|37|38|39|40|41|42|43|44|45|46
Jason Balicki wrote:
This should be a quickie, I hope:
I'm parsing an array that contains things like Zap/1 Zap/2 Zap/3 ... etc.
I'm only concerned with Zap/32 - Zap/47.
Will this work:
if (($zapdef eq "Zap/*") and ($zapdef eq
"*[32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47]*")) {
On Jan 8, 2013, at 4:28 AM, punit jain wrote:
> Hi ,
>
> I have a file as below : -
>
> {
> test = ("test123");
> test = ("test123","abc");
> test = ("test123","abc","xyz");
> }
> {
> test1 = ("passfile");
> test1 = ("passfile","pasfile1");
> test1 = ("passfile","pasfile1","user");
> }
>
> and
Hi punit jain,
Please check my comments below.
On Tue, Jan 8, 2013 at 1:28 PM, punit jain wrote:
> Hi ,
>
> I have a file as below : -
>
> {
> test = ("test123");
> test = ("test123","abc");
> test = ("test123","abc","xyz");
> }
> {
> test1 = ("passfile");
> test1 = ("passfile","pasfile1");
> t
etty1","jack");
test3 = ("betty","betty1");
test3 = ("betty");
}
[/code]
[output]
test = ("test123","abc","xyz");
test1 = ("passfile","pasfile1","user");
test2 = ("temp","temp1","username");
test3 = ("betty","betty1&
On 2013-01-08 13:28, punit jain wrote:
{
test = ("test123");
test = ("test123","abc");
test = ("test123","abc","xyz");
}
{
test1 = ("passfile");
test1 = ("passfile","pasfile1");
test1 = ("passfile","pasfile1","user");
}
and so on
The requirement is to have the file parsing so that final o
Hi!
What about just doing
$string =~ s/<[^>]+>//;
which will match any number of chars that AREN'T ">" and a ">" behind that.
Sascha
At 12:06 20.08.01 +0200, you wrote:
>Im not sure if this is possible but i want to delete all chars inbeteen
>< and > so if i had id like to delete it,
>Her
Thi small program will explain how it can be done :
#! /opt/bin/perl5 -w
$str = 'This contains a number of ( and ) ... ';
$str =~ s/<.*?>/<>/g;
print "$str\n";
This program will remove all characters between < and >.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
George Pereira
CMIE
11, Apple
Hello All,
I'd like to know if a file name is like namefile.ext (only one dot in the name)
or namefile.xxx.z.ext (more than one dot in the name).
I tried with regex:
$file1='doctobepublish.new.pdf';
if ( $file1 =~ /\.{2,}/ ) { print "KO filename not properly formatted"; }
else
Hello,
I need to find all % characters in a string that are not element attributes.
for syntax instance:
some value%
I need a regex that matches the % in value% but not in 100% because it is
within angle braces.
Is it possible or more complicated than regex?
TIA,
-John
--
To unsubscribe
do not reinvent the wheel!!
--
# you can get this on CPAN
use Date::Parse;
use POSIX;
# assume your to-be-formatted date is in $date_in
my $date_iso8601 = POSIX::strftime ("%Y-%m-%d %H:%M:%S",
localtime (Date::Parse::str2time ($date_in)));
tada!! the real magic is in str2time: it conve
Hey All,
I have a following a LDIF file to process through Perl -
###
dn: ou=71404558, ou=Company, ou=Personal, o=paragkalra.com
dn: ou=People, ou=71404558, ou=Company, ou=Personal, o=paragkalra.com
dn: ou=Groups, ou=71404558, ou=Company
rs Mailing List
Subject: again a regex help needed
Hello All,
I'd like to know if a file name is like namefile.ext (only one dot in the
name)
or namefile.xxx.z.ext (more than one dot in the name).
I tried with regex:
$file1='doctobepublish.new.pdf';
if ( $file1 =~ /\.{2,}/
Marco Centemeri wrote:
>
> Hello All,
Hello,
> I'd like to know if a file name is like namefile.ext (only one dot in the name)
> or namefile.xxx.z.ext (more than one dot in the name).
> I tried with regex:
>
> $file1='doctobepublish.new.pdf';
>
> if ( $file1 =~ /\.{2,}/ ) { print "KO filen
Hi,
Maybe try:
if ($file =~/\..*\./) {
...
}
I just checked it. It works.
Joseph
Marco Centemeri wrote:
> Hello All,
> I'd like to know if a file name is like namefile.ext (only one dot in the name)
> or namefile.xxx.z.ext (more than one dot in the name).
> I tried with regex:
>
> $fil
On Fri, 9 Jul 2004 15:17:20 -0400, perl.org wrote
>
> I need to find all % characters in a string that are not element
> attributes. for syntax instance:
>
> some value%
>
> I need a regex that matches the % in value% but not in 100% because
> it is within angle braces.
>
> Is it possible or
> Hello,
>
> I need to find all % characters in a string that are not element
attributes.
> for syntax instance:
>
> some value%
>
> I need a regex that matches the % in value% but not in 100% because it is
> within angle braces.
>
> Is it possible or more complicated than regex?
>
As your s
Try this:
_BEGIN_
#!/usr/bin/perl
use warnings;
use strict;
my $html = 'some value%';
$html =~ /(?:\<.+\>)?(.+\%)(?:\<.+\>)?/;
print $1;
_END_
HTH,
Rod
--- Wiggins d Anconia <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I need to find all % characters in a string that are not element
> attribu
Hi all,
That's about the whole story, but I'll make it short.
For example, I have a list like this :
123ABCDEF456
123456
654WXYZ321
987654321
ABCDEF123456
WXYZ321
By user's INTEGER input , I will have to find how many similar
patterns are matched within the list according to certain chars (user
On Fri, Nov 13, 2009 at 5:07 AM, Parag Kalra wrote:
> Hey All,
>
> I have a following a LDIF file to process through Perl -
>
> ###
> dn: ou=71404558, ou=Company, ou=Personal, o=paragkalra.com
> dn: ou=People, ou=71404558, ou=Company, ou
On Fri, Nov 13, 2009 at 5:07 AM, Parag Kalra wrote:
> Hey All,
>
> I have a following a LDIF file to process through Perl -
>
> ###
> dn: ou=71404558, ou=Company, ou=Personal, o=paragkalra.com
> dn: ou=People, ou=71404558, ou=Company, ou
Parag Kalra wrote:
> I have a following a LDIF file to process through Perl -
>
> Any pointers?
http://search.cpan.org/search?query=LDIF&mode=all
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Per
Thanks 007
It worked out of the box :)
Cheers,
Parag
On Fri, Nov 13, 2009 at 8:03 PM, 7 <7stud.7s...@gmail.com> wrote:
> On Fri, Nov 13, 2009 at 5:07 AM, Parag Kalra wrote:
>
>> Hey All,
>>
>> I have a following a LDIF file to process through Perl -
>>
>> ###
I have an array of regex expressions that I apply to text returned from
tesseract.
Each match that I get then gets stored for future processing. However,
I'm struggling with one regex.
The problem is that:
1) with brackets round the titles it returns two matches.
2) without brackets, it retu
I need to remove HTML scripts from some pages.
I have to replace
<*script*>* with blanks. This includes all
javascript/vbscript
in between the tags
I'm using the * as guidelines to show it must match several variations.
Thoughts ? Ideas? Suggestions?
Thanks !
Jon
--
To unsub
Li Ngok Lam wrote:
>
> Hi all,
>
> That's about the whole story, but I'll make it short.
> For example, I have a list like this :
>
> 123ABCDEF456
> 123456
> 654WXYZ321
> 987654321
> ABCDEF123456
> WXYZ321
>
> By user's INTEGER input , I will have to find how many similar
> patterns are matched wi
Li Ngok Lam wrote:
>
> Hi all,
Hello,
> That's about the whole story, but I'll make it short.
> For example, I have a list like this :
>
> 123ABCDEF456
> 123456
> 654WXYZ321
> 987654321
> ABCDEF123456
> WXYZ321
>
> By user's INTEGER input , I will have to find how many similar
> patterns are m
Thanks John, and Rob.
This reply is quite close to what I am going to do,
but some critical point is wanted here I'll try to explain
my question further
>
> > That's about the whole story, but I'll make it short.
> > For example, I have a list like this :
> >
> > 123ABCDEF456
> > 123456
Li Ngok Lam wrote:
>
> Thanks John, and Rob.
>
> This reply is quite close to what I am going to do,
> but some critical point is wanted here I'll try to explain
> my question further
>
> It does, and thaz about my coding currently up to.
>
> > #!/usr/bin/perl
> > use warnings;
> >
Li Ngok Lam wrote:
> Hi all,
>
> That's about the whole story, but I'll make it short.
> For example, I have a list like this :
>
> 123ABCDEF456
> 123456
> 654WXYZ321
> 987654321
> ABCDEF123456
> WXYZ321
>
> By user's INTEGER
Please don't do this. The word "integer" is not being used as a global
Well, it seems that the first one is what you want, but you just need to
use $1 and ignore $2.
You do need parentheses in '(mr|mrs|miss|dr|prof|sir)' but if you do not
want for them to be captured in $2, you can use:
'(?:mr|mrs|miss|dr|prof|sir)'. For example:
print "match3='$1' '$2'\n" if
(
On 02/12/2020 13:56, Vlado Keselj wrote:
Well, it seems that the first one is what you want, but you just need to
use $1 and ignore $2.
You do need parentheses in '(mr|mrs|miss|dr|prof|sir)' but if you do not
want for them to be captured in $2, you can use:
'(?:mr|mrs|miss|dr|prof|sir)'. For ex
In your original example:
print "match1='$1' '$2'\n" if ($T=~/^((mr|mrs|miss|dr|prof|sir) .{5,}?)\n/smi);
print "match2='$1' '$2'\n" if ($T=~/^(mr|mrs|miss|dr|prof|sir .{5,}?)\n/smi);
the interior parentheses in example one terminates the alternation, so the last
string is ’sir’.
In example two
Not an expert but is the problem that you are using single quotes instead
of double. When you use single quotes variables aren't interpreted.
--
D. M. Monarres ([EMAIL PROTECTED])
Some people have parts that are so private they themselves have no
knowledge of them.
On Sat, 11 Aug 2001 16:03:15
From: "Jon Shoberg" <[EMAIL PROTECTED]>
> I need to remove HTML scripts from some pages.
>
> I have to replace
>
> <*script*>* with blanks. This includes all
> javascript/vbscript
> in between the tags
>
> I'm using the * as guidelines to show it must match several
> va
201 - 267 of 267 matches
Mail list logo