On Dec 22, 2007 3:38 AM, Dermot <[EMAIL PROTECTED]> wrote:
>
>
>
> On 22/12/2007, Jay Savage <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 20, 2007 3:54 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> > > Rob Dixon schreef:
> > > > Dr.Ruud wrote:
> > > >> Jay Savage schreef:
> > > >>> Corin Lawson wrote:
> >
On Dec 20, 2007 3:54 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> Rob Dixon schreef:
> > Dr.Ruud wrote:
> >> Jay Savage schreef:
> >>> Corin Lawson wrote:
>
> Can you not simply count the number of quotes mod 2?
> >>>
> >>> No, you can't just count the number of quotes. An even number of
> >>> quo
Rob Dixon schreef:
> Dr.Ruud wrote:
>> Jay Savage schreef:
>>> Corin Lawson wrote:
Can you not simply count the number of quotes mod 2?
>>>
>>> No, you can't just count the number of quotes. An even number of
>>> quotes doesn't mean they're all double quotes. Consider something
>>> like q|a'b
Dr.Ruud wrote:
"Jay Savage" schreef:
Corin Lawson wrote:
Can you not simply count the number of quotes mod 2?
No, you can't just count the number of quotes. An even number of
quotes doesn't mean they're all double quotes. Consider something like
q|a'b'c''d'e'f|.
I haven't read anywhere yet
"Jay Savage" schreef:
> Corin Lawson wrote:
>> Can you not simply count the number of quotes mod 2?
>
> No, you can't just count the number of quotes. An even number of
> quotes doesn't mean they're all double quotes. Consider something like
> q|a'b'c''d'e'f|.
I haven't read anywhere yet that the
Rob Dixon schreef:
> Dr.Ruud wrote:
>> Rob Dixon schreef:
>>> scooter:
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
aa''bb''c''c - S
Please don't top post...
On Dec 18, 2007 6:41 PM, Corin Lawson <[EMAIL PROTECTED]> wrote:
> Hi ab,
>
> Can you not simply count the number of quotes mod 2?
>
No, you can't just count the number of quotes. An even number of
quotes doesn't mean they're all double quotes. Consider something like
q|a
Dr.Ruud wrote:
Rob Dixon schreef:
scooter:
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
aa''bb''c''c - Should Match
a''b - Should Match
ab'' - Should Match
aa'
Hi ab,
Can you not simply count the number of quotes mod 2?
Cheers,
Corin.
On 19/12/2007, at 6:23 AM, scooter wrote:
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
Rob Dixon schreef:
> scooter:
>> Can someone help me with the regexp that will match exactly two
>> quotes(') or no quotes in the string.
>> If a single quote exists, then will break out.
>>
>> eg:
>> aabbcc - Should Match
>> aa''bb''c''c - Should Match
>> a''b - Should Match
>> ab'' - Should Ma
Dr.Ruud wrote:
scooter schreef:
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
aa''bb''c''c - Should Match
a''b - Should Match
ab'' - Should Match
aa'bbcc - Should
scooter wrote:
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
aa''bb''c''c - Should Match
a''b - Should Match
ab'' - Should Match
aa'bbcc - Should not Match
aa''bb'c
On 12/18/07, yitzle <[EMAIL PROTECTED]> wrote:
> I tried to do something like the following, but it didn't work. It
> fails on a zero-quote line. No idea why.
> /^([^']*'[^']*'[^']*)*$/
No idea? Here's one: If it is to match a non-trivial string, your
pattern needs to find at least two apostrophe
scooter schreef:
> Can someone help me with the regexp that will match exactly two
> quotes(') or no quotes in the string.
> If a single quote exists, then will break out.
>
> eg:
> aabbcc - Should Match
> aa''bb''c''c - Should Match
> a''b - Should Match
> ab'' - Should Match
>
>
> aa'bbcc - Sho
On 12/18/07, scooter <[EMAIL PROTECTED]> wrote:
> Can someone help me with the regexp that will match exactly two
> quotes(') or no quotes in the string.
> If a single quote exists, then will break out.
You are saying what you want for the cases of zero, one, or two single
quote marks in the stri
Nasty piece of code, but works:
__CODE__
while (<>) {
print;
my @a = /\'/g ;
print "MATCH\n" if not scalar (@a) % 2;
}
__END__
Matches blank lines as well.
I tried to do something like the following, but it didn't work. It
fails on a zero-quote line. No idea why.
/^([^']*'[^']*'[^']*)
Can someone help me with the regexp that will match exactly two
quotes(') or no quotes in the string.
If a single quote exists, then will break out.
eg:
aabbcc - Should Match
aa''bb''c''c - Should Match
a''b - Should Match
ab'' - Should Match
aa'bbcc - Should not Match
aa''bb'cc - Should not Ma
17 matches
Mail list logo