D
dfairman16
Hi all
What I want my Perl programme to print out is
w
=
1
AND
(
(
x.y
=
"FRED ("
)
OR
(
z
=
2
)
)
generated from
w =1 AND ( (x.y="Fred (") OR (z=2) )
The problem is that although Perl and regular expressions are suitable
for the task, my starting point is that I have to learn Perl ... well
I'm learning it anyway, slowly, and the only thing that appears simple
is Hello World. Regular expressions are really complex, more than I
had thought. The bit the regular expression I am trying to use above
is that I don't care about spaces except for when they are enclosed by
double quotes (the "FRED (" bit in the query example above).
The query above is a real cut down simple version of the query string
that I would like to start to work on. The real query is a lot more
complex but I want to get it working for a very simple one first, then
extend the Perl, and during extending it learn more of the subset of
Perl I need to know to get it all done.
At the risk of being accused of asking someone to do my project for
me, as above is a starting point I would really appreciate being
pointed in the right direction. Not that it should matter but I
include the information for completeness, I am using Perl 5.8.8 on
Suse linux 8.
Thank you
David Fairman
UK
ps. I don't clear my email from this email account so reply in this
newsgroup. This email address is just one I use to stop me getting
spam at home.
What I want my Perl programme to print out is
w
=
1
AND
(
(
x.y
=
"FRED ("
)
OR
(
z
=
2
)
)
generated from
w =1 AND ( (x.y="Fred (") OR (z=2) )
The problem is that although Perl and regular expressions are suitable
for the task, my starting point is that I have to learn Perl ... well
I'm learning it anyway, slowly, and the only thing that appears simple
is Hello World. Regular expressions are really complex, more than I
had thought. The bit the regular expression I am trying to use above
is that I don't care about spaces except for when they are enclosed by
double quotes (the "FRED (" bit in the query example above).
The query above is a real cut down simple version of the query string
that I would like to start to work on. The real query is a lot more
complex but I want to get it working for a very simple one first, then
extend the Perl, and during extending it learn more of the subset of
Perl I need to know to get it all done.
At the risk of being accused of asking someone to do my project for
me, as above is a starting point I would really appreciate being
pointed in the right direction. Not that it should matter but I
include the information for completeness, I am using Perl 5.8.8 on
Suse linux 8.
Thank you
David Fairman
UK
ps. I don't clear my email from this email account so reply in this
newsgroup. This email address is just one I use to stop me getting
spam at home.