You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Norm Deane <no...@vanderbilt.edu> on 2005/01/10 21:08:07 UTC
[commons-jexl]
Can jexl be extended to do regexp evaluation against strings? If not,
does anyone know of a JEXL-like expression evaluator that will do this?
Thanks,
Norm
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [commons-jexl]
Posted by Paul Libbrecht <pa...@activemath.org>.
But you can always create your own matching objects and run them there!
<j:new var="matcher" className="my.matcher.Matcher"><j:arg
value="...."/></j:new>
<j:mute>${matcher.match(input}}</j:mute>
<j:if test="${matcher.didMatch()}">
Do something
</j:if>
That's the way you can do, typically, with a jakarta-regexp or oro
library.
Also, there's a regexp tag-library. Have you looked at it ?
paul
Le 11 janv. 05, à 15:46, Norm Deane a écrit :
> Unfortunately we're still using JDK1.3 (app server requirement). What
> I'd like to be able to do is...
>
> Given a class called Course which has a 'name' property. Be able to
> write some type of expression that evaluates the name property NOT for
> equality, less than, greater than, etc but evaluates the name property
> against some type of regexp. I'd like to do this within JEXL because
> there will be other types of evaluations that need to be made on the
> Course object.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [commons-jexl]
Posted by Norm Deane <no...@vanderbilt.edu>.
Unfortunately we're still using JDK1.3 (app server requirement). What
I'd like to be able to do is...
Given a class called Course which has a 'name' property. Be able to
write some type of expression that evaluates the name property NOT for
equality, less than, greater than, etc but evaluates the name property
against some type of regexp. I'd like to do this within JEXL because
there will be other types of evaluations that need to be made on the
Course object.
--Norm
Dion Gillard wrote:
> With JDK1.4 you can do this already with methods like
> String.matches(String regexp).
>
> You should be able to call those directly from JEXL.
>
> Does that help?
>
>
> On Mon, 10 Jan 2005 14:08:07 -0600, Norm Deane
> <no...@vanderbilt.edu> wrote:
>
>>Can jexl be extended to do regexp evaluation against strings? If not,
>>does anyone know of a JEXL-like expression evaluator that will do this?
>>
>>Thanks,
>>
>>Norm
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [commons-jexl]
Posted by Dion Gillard <di...@gmail.com>.
With JDK1.4 you can do this already with methods like
String.matches(String regexp).
You should be able to call those directly from JEXL.
Does that help?
On Mon, 10 Jan 2005 14:08:07 -0600, Norm Deane
<no...@vanderbilt.edu> wrote:
> Can jexl be extended to do regexp evaluation against strings? If not,
> does anyone know of a JEXL-like expression evaluator that will do this?
>
> Thanks,
>
> Norm
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
--
http://www.multitask.com.au/people/dion/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org