You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2005/11/18 02:45:17 UTC

Re: ant/JakartaOroRegexp multiline question

In message <OF18647F5C.47C7E9D7-ON882570BC.007EB622-882570BC.007EB630@tamgroup.
com>, Dan Urbano writes:
>I am using jakarta-oro 2.0.8 and I think regexp-1.4.  I assume oro 2.0.8 is
>dependent on the regex project and that the jvm picks up the
>jakarta-regexp-1.4.jar I put in the ant/lib directory.

jakarta-oro is not dependent on jakarta-regexp.

>If I only look for one line with, or without the "^" and "$", it works
>(e.g. ^LOOK FOR ME$).  It's only when looking accross multiple lines that
>it does not.
>
>Am I using the right syntax?  Did I set up the "flags" and "byline"
>attributes correctly?

This should probably be a question for ant-user if you're asking about
ant task attributes.  However, $ does not match a newline and neither
does ^.  Therefore, ^LOOK FOR ME$^AND ME$ should not match anything ever.
You need to account for the newline because $ and ^ are zero-length
positional expressions (i.e., put put \n between the $ and the ^).  Keep
the m flag though, because it won't work with s.

daniel

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
    s a v a r e s e      # In distant lands, I hear the call of my home.
   software research     # Yet my work is not done.  My journey's just begun.
http://www.savarese.com/ #  -- http://www.sleepandthetraveller.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-user-help@jakarta.apache.org