public class regexMatchFunction extends Object implements FilterFunction
REGEX( 'A.B', 'A-B' )
Note that the regular expression is not anchored; use the anchor characters, ^ and $, as-needed. For example, REGEX( 'AA', 'XAAX' ) evaluates to true while REGEX( '^AA$' , 'XAAX' ) evaluates to false.Modifier and Type | Field and Description |
---|---|
protected static LRUCache<String,Pattern> |
compiledExprCache |
Constructor and Description |
---|
regexMatchFunction() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(FunctionCallExpression expr,
MessageEvaluationContext message)
Evalutate the given expression, which consists of a call to this function, in the context given.
|
protected Pattern |
getCompiledPattern(String reg_ex_str)
Retrieve a compiled pattern for the given pattern string.
|
boolean |
isValid(FunctionCallExpression expr)
Check whether the given expression is a valid call of this function.
|
boolean |
returnsBoolean(FunctionCallExpression expr)
Indicate that this Filter Function evaluates to a Boolean result.
|
protected static final LRUCache<String,Pattern> compiledExprCache
public regexMatchFunction()
public boolean isValid(FunctionCallExpression expr)
isValid
in interface FilterFunction
expr
- - the expression consisting of a call to this function.public boolean returnsBoolean(FunctionCallExpression expr)
returnsBoolean
in interface FilterFunction
expr
- - the expression consisting of a call to this function.public Object evaluate(FunctionCallExpression expr, MessageEvaluationContext message) throws JMSException
evaluate
in interface FilterFunction
expr
- - the expression consisting of a call to this function.message_ctx
- - the context in which the call is being evaluated.JMSException
protected Pattern getCompiledPattern(String reg_ex_str)
reg_ex_str
- - the string specifying the regular expression.Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.