Plus (+) in PerlUtil.match [] regexps

Mike Laskin <[email protected]> Mon, 8 Apr 2002 10:11:10 -0700
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <E1932DB448A64D4898D773691B7CC7AE012C962B@diexgcu1.digitalimpact.com>
Hi,
 
I am having some trouble finding a matching string for the following unix
command.
perl -e 'while (<>) {if (/([ A-Za-z0-9;\/?:@
<mailto:A-Za-z0-9;\/?:@&=$,\-_.!~*\+()%#|\x2b> &=$,\-_.!~*\+()%#|\x2b]+)/)
{print;}}'
This will accept input like
a+b
+
b+
and not
<
>
 
etc.
 
The corresponding Java version I have is:
      if ( perlUtil.match("/([  <mailto:A-Za-z0-9;\\/?:@&=$,\\-_.!~*>
A-Za-z0-9;\\/?:@&=$,\\-_.!~*\\+()%#|\\x2b]+)/",   postMatch) )

and this does not accept any of the strings above
 
I am guessing that I am not escaping the + properly in the Java version --
Would anyone have any recommendations on other ways?  As you can see I have
tried the hex \\x2b <file://\\x2b>  and that did not seem to help.
 
BTW: I am using ORO 2.0.2
 
Thanks,
Mike

--
To unsubscribe, e-mail:   <mailto:[email protected]>
For additional commands, e-mail: <mailto:[email protected]>