RE: Regular Expression Help Please

2005-02-08 Thread Chris
-Original Message- One of the columns I'm calling out of my database is the email one. I'ts in MAPI format, so I need to extract the very last part. So the bottom example I would need to grab JDoe MAPI:{Doe, John}EX:/o=Company/ou=Site/cn=Recipients/cn=JDoe Then I can append the res

Re: Regular Expression Help Please

2005-02-08 Thread Chris Wagner
You can get that plus some other info with this regex: $string = 'MAPI:{Doe, John}EX:/o=Company/ou=Site/cn=Recipients/cn=JDoe'; ($lastname, $firstname, $mailid) = $string =~ m/^.+?\{(\w+), (\w+)\}.+?cn\=(\w+)$/; At 09:46 PM 2/8/05 +, steve silvers wrote: >One of the columns I'm calling out o

RE: Regular Expression Help Please

2005-02-08 Thread Charles K. Clarkson
From: [EMAIL PROTECTED] <> wrote: : One of the columns I'm calling out of my database is the email : one. I'ts in MAPI format, so I need to extract the very last : part. So the bottom example I would need to grab : : JDoe : : MAPI:{Doe, John}EX:/o=Company/ou=Site/cn=Recipients/cn=JDoe : : : Th

RE: Regular Expression Help Please

2005-02-08 Thread Gerber, Christopher J
-Original Message- > One of the columns I'm calling out of my database is the email one. I'ts in MAPI format, > so I need to extract the very last part. So the bottom example I would need to grab > > JDoe > > MAPI:{Doe, John}EX:/o=Company/ou=Site/cn=Recipients/cn=JDoe Steve, An easy way

Sorry (was RE: Regular Expression Help)

2002-06-12 Thread Lee Goddard
n others, but lets remember that we is all brothers in alms with >our won common >language - Perl ; ) > >Flame at will! > >-Original Message- >From: Ron Grabowski [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, June 12, 2002 2:16 AM >To: [EMAIL PROTECTED] >Subject

RE: Regular Expression Help

2002-06-11 Thread Allegakoen, Justin Devanandan
lets remember that we is all brothers in alms with our won common language - Perl ; ) Flame at will! -Original Message- From: Ron Grabowski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 2:16 AM To: [EMAIL PROTECTED] Subject: Re: Regular Expression Help > >phone numbe

Re: Regular Expression Help

2002-06-10 Thread steve silvers
: $query->('areacode') =~ m/\d{3}/g; I want to make sure that there is only 3 digits, not two, or four. Steve. >From: "Stephen J Martin" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "steve silvers" <[EMAIL PROTECTED]> >CC: [EMAIL PROTEC

RE: Regular Expression Help

2002-06-10 Thread Michael D. Smith
There is the example from the Camel book for putting in commas, 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; which can easily be modified from three and comma, to two and a space: 1 while s/(\d)(\d\d)(?!\d)/$1 $2/; Which also leaves odd ones on the left. The previous solution put them on the right.

RE: Regular Expression Help

2002-06-10 Thread Stephen J Martin
On Mon, 10 Jun 2002 10:29:28 Arms, Mike wrote: >>PS I have learned something from this post, I didn't know you could >>define a string using brackets as you have done... > >Except that what you learned: > > $a = (12345678904539); > >is a bad practise. It is a novice mistake. What is being don

RE: Regular Expression Help

2002-06-10 Thread Stephen J Martin
On Mon, 10 Jun 2002 11:38:29 Rubinow, Larry wrote: >Jim Angstadt wrote: > >> produces: >> * 12 34 56 71 23 4* >> *12 34 56 71 234* >> *12 34 56 71 23 4* >> >> * 12 34 56 71 23 45* >> *12 34 56 71 23 45* >> *12 34 56 71 23 45 * >> >> * 12 34 5

RE: Regular Expression Help

2002-06-10 Thread Rubinow, Larry
Jim Angstadt wrote: > When I run this snippet below, using the three > approaches from others, there are three slightly > different results. See results at end. > > Please note spaces at start and end of some results. > Also, note results with a number of odd length. > > Perhaps the differen

RE: Regular Expression Help

2002-06-10 Thread Jim Angstadt
--- Stephen J Martin <[EMAIL PROTECTED]> wrote: > On Mon, 10 Jun 2002 09:10:05 > Joseph Youngquist wrote: > >This worked for me, > >$a = 12345678904539; > >@numbers = split(/(\d{2})/, $a); > >$NewA = join(' ', @numbers); > >print "\nNew A: $NewA"; > > >-Original Message- > >From: >

RE: Regular Expression Help

2002-06-10 Thread Arms, Mike
$a = (abc); # this is an error! -- Mike Arms -Original Message- From: Stephen J Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 8:51 AM To: steve silvers Cc: [EMAIL PROTECTED] Subject: Re: Regular Expression Help On Mon, 10 Jun 2002 13:38:52 steve silvers wrote: >How can

Re: Regular Expression Help

2002-06-10 Thread Stephen J Martin
On Mon, 10 Jun 2002 13:38:52 steve silvers wrote: >How can I put a white space between every second number. > >I have $a = (12345678904539); >I want 12 34 56 78 90 45 39 > >I'm trying > >$a =~ s/\\d[2*]/ /g; #This obviously dosen't work :-( > >Also how can I tell if there are 3,4, or 5 digits.

RE: Regular Expression Help

2002-06-10 Thread Stephen J Martin
On Mon, 10 Jun 2002 09:10:05 Joseph Youngquist wrote: >This worked for me, >$a = 12345678904539; >@numbers = split(/(\d{2})/, $a); >$NewA = join(' ', @numbers); >print "\nNew A: $NewA"; >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]]On Behalf Of >steve silver

RE: Regular Expression Help

2002-06-10 Thread Rubinow, Larry
Joseph Youngquist wrote: > This worked for me, > > $a = 12345678904539; > > @numbers = split(/(\d{2})/, $a); > > $NewA = join(' ', @numbers); > > print "\nNew A: $NewA"; Or, more simply, s/(\d\d)(?=\d\d)/$1 /g; ___ Perl-Win32-Users mailing list [

RE: Regular Expression Help

2002-06-10 Thread Joseph Youngquist
This worked for me, $a = 12345678904539; @numbers = split(/(\d{2})/, $a); $NewA = join(' ', @numbers); print "\nNew A: $NewA"; hth, Joe Y. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of steve silvers Sent: Monday, June 10, 2002 8:39 AM To: [EMAIL

Re: Regular expression help

2001-12-02 Thread Carl Jolley
On Sat, 1 Dec 2001, linkagent wrote: > - Original Message - > From: "$Bill Luebkert" <[EMAIL PROTECTED]> > To: "linkagent" <[EMAIL PROTECTED]> > > linkagent wrote: > > > I need members help on this; > > > Q1)As far as I know, \d* means match either 0 or more digits, since > > > /(\d*)

Re: Regular expression help

2001-12-01 Thread $Bill Luebkert
linkagent wrote: > > Correct me if I am wrong; > Therefore am I right to say that the matching sequence starts from the back > first (which is not what I read from the books about matching / /). > > i.e in the following match /(\d*)(\d{4})(\d{5})$/ > the regexes look for $ first; > then followe

Re: Regular expression help

2001-12-01 Thread Keith C. Ivey
linkagent <[EMAIL PROTECTED]> wrote: > Correct me if I am wrong; > Therefore am I right to say that the matching sequence starts > from the back first (which is not what I read from the books > about matching / /). No, the matcher starts from the front, but when it fails it backtracks to see if

Re: Regular expression help

2001-12-01 Thread Terry Carroll
On Sat, 1 Dec 2001, linkagent wrote: > - Original Message - > From: "$Bill Luebkert" <[EMAIL PROTECTED]> > To: "linkagent" <[EMAIL PROTECTED]> > > linkagent wrote: > > > I need members help on this; > > > Q1)As far as I know, \d* means match either 0 or more digits, since > > > /(\d*)

Re: Regular expression help

2001-12-01 Thread linkagent
- Original Message - From: "$Bill Luebkert" <[EMAIL PROTECTED]> To: "linkagent" <[EMAIL PROTECTED]> > linkagent wrote: > > I need members help on this; > > Q1)As far as I know, \d* means match either 0 or more digits, since > > /(\d*)/ match 1006326869812 , therefore > > I could not se

Re: Regular expression help

2001-11-30 Thread $Bill Luebkert
linkagent wrote: > - Original Message - > From: "Ron Hartikka" <[EMAIL PROTECTED]> > >>for $number (1006326869812, 563296853235993 , 35968322963568389){ >>print "$1-$2-$3\n" if ($number =~ /(\d*)(\d{4})(\d{5})/); >> > > I need members help on this; > Q1)As far as I know, \d* means m

Re: Regular expression help

2001-11-30 Thread linkagent
- Original Message - From: "Ron Hartikka" <[EMAIL PROTECTED]> > for $number (1006326869812, 563296853235993 , 35968322963568389){ > print "$1-$2-$3\n" if ($number =~ /(\d*)(\d{4})(\d{5})/); I need members help on this; Q1)As far as I know, \d* means match either 0 or more digits, sinc

RE: Regular expression help

2001-11-29 Thread rplane
Thanks to all those who responded Rob -Original Message- From: Plane, Robert Sent: Thursday, November 29, 2001 3:32 PM To: '[EMAIL PROTECTED]' Subject: Regular expression help I need help creating a regular expression to do the following. I have the following numbers: 1006326869812

Re: Regular expression help

2001-11-29 Thread David Kaufman
<[EMAIL PROTECTED]> wrote: > I need help creating a regular expression to do the following. > > I have the following numbers: > > 1006326869812 > 563296853235993 > 35968322963568389 > > and it needs to be broken up like this > > 1006-3268-69812 > 563296-8532-35993 > 35968322-9635-68389 > > Notice

Re: Regular expression help

2001-11-29 Thread Jeffrey
How about something like s/(\d+)(\d{4})(\d{5})/$1-$2-$3/ ? --- [EMAIL PROTECTED] wrote: > I need help creating a regular expression to do the > following. > > I have the following numbers: > > 1006326869812 > 563296853235993 > 35968322963568389 > > and it needs to be broken up like this > > 1

RE: Regular expression help

2001-11-29 Thread Wagner-David
Here is a start: if the needs to numeric and the format stated, then change the s/^(\d+)(\d{4})(\d{5})$/$1-$2-$3/ to if ( s/^(\d+)(\d{4})(\d{5})$/$1-$2-$3/ ) { }else { #error of sometype } #!perl -w while ( ) { chomp; s/^(\d+)(\d{4})(\d

RE: Regular expression help

2001-11-29 Thread Hanson, Robert
You don't even need a regex although you could use one... # untested my $num = 92739874598745; $num =~ /^(\d*)(d{4})(\d{5})$/; my ($n1, $n2, $n3) = ($1, $2, $3); Or you could do this... # untested my $num = 92739874598745; my $n1 = substr($num, 0, length($num) - 9); my $n2 = substr($num, -9, 4

RE: Regular expression help

2001-11-29 Thread Rubinow, Larry
[EMAIL PROTECTED] wrote: > I need help creating a regular expression to do the following. > > I have the following numbers: > > 1006326869812 > 563296853235993 > 35968322963568389 > > and it needs to be broken up like this > > 1006-3268-69812 > 563296-8532-35993 > 35968322-9635-68389 > > Not

RE: Regular expression help

2001-11-29 Thread Ron Hartikka
for $number (1006326869812, 563296853235993 , 35968322963568389){ print "$1-$2-$3\n" if ($number =~ /(\d*)(\d{4})(\d{5})/); } > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: Thursday, November 29, 2001 3:32 PM >