Use contains() method.
_____

<mailto:[EMAIL PROTECTED]> Alexey N. Solofnenko.
<http://www.citechlabs.com/> Citech Inc.
Pleasant Hill, CA (GMT-8 usually)


-----Original Message-----
From: Strong, Mike [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 17, 2001 2:13 PM
To: '[EMAIL PROTECTED]'
Subject: A regex pattern that works in perl is giving me fits within ORO


I hope this is appropriate for the oro user list.
-------------------------------------------------

Though the pattern expression in the following code snippet works in
Perl...

$foo = "href=\"tstA_q1.htm\"";
if ( $foo =~ /href=\"(tst[A-Z]_[Qq][1-9]\.html?)\"/ ) {
    print "FOO: " .  $foo . "\n";
} else {
    print "Didn't match.\n";
}

... in my JSP code, while trying to do what I thought was essentially
the
same thing:

if(perl.match("href=\"(tst[A-Z]_[Qq][1-9]\\.html?)\"", line)) {
 ...
}

I get the complaint that the pattern is malformed:

org.apache.oro.text.perl.MalformedPerl5PatternException: Invalid
expression:
href="(tst[A-Z]_[Qq][1-9]\.html?)"
        at
org.apache.oro.text.perl.Perl5Util.__parseMatchExpression(Perl5Util.java
:284
)

I've tried many things, but obviously not the right thing(s).  ;o]

I've double escaped the double quotes.
I've abandoned the parenthetical grouping.
I've eliminated the conditional presence of 'l' at the end of .htm.
... and other things.

Any advice for a new user?

Thanks, in advance.

Mike
BEGIN:VCARD
VERSION:2.1
N:Solofnenko;Alexey;N.
FN:Alexey N. Solofnenko
ORG:FSA
TEL;HOME;VOICE:+1 (925) 682-5956
TEL;CELL;VOICE:+1 (925) 997-4064
ADR;WORK:;;43 Massolo Dr. apt. C;Pleasant Hill;CA;94523-2415;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:43 Massolo Dr. apt. C=0D=0APleasant Hill, CA 94523-2415=0D=0AUnited States o=
f America
ADR;HOME:;;43 Massolo Dr. apt. C;Pleasant Hill;CA;94523-2415;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:43 Massolo Dr. apt. C=0D=0APleasant Hill, CA 94523-2415=0D=0AUnited States o=
f America
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010719T233653Z
END:VCARD

smime.p7s

Reply via email to