On Thu, Oct 2, 2008 at 7:01 AM, acowart <[EMAIL PROTECTED]> wrote:
>
> I created a multi-select list as a release note field in JIRA.
>
> The different options are:
> Base
> Dispatch
> Domain Manager
> Installer
> Mobile
>
> I am now trying to write IF statements to find if each of the of the options
> are selected.
>
> So I am trying to write a regular expression to evaluate what is selected in
> the multi-select.
>
> Currently, I put all of the data from the multi-select custom field for an
> issue into the a variable, $Component. This means the value of $Component
> will be something like [Dispatch, Domain Manager, Installer]
>
> The code that I am trying to figure out how to write is something like:
>
> #if ("$Component" like "Domain Manager")
>
> Does anyone know a way to do this type of string comparison on a variable?
> Or a way to use regular expressions in an if statement when validating a
> string variable.
Java 5's String class provides the matches(regex) method.
#set( $str = "$var" )
#if( $str.matches('regexp') )
> Thanks.
>
> AC
> --
> View this message in context:
> http://www.nabble.com/-jira--Evaluating-Strings-%28regular-expressions---string-comparison%29-tp19779866p19779866.html
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]