Advertisement

07.16.2008 at 09:42AM PDT, ID: 23570364 | Points: 250
[x]
Attachment Details

Regular Expression: How do I match multiple list items on different lines?

Asked by icentris in Regular Expressions

Tags: regex, n/a

Greetings,

I'm attempting to create a regex for JMeter (pearl based regex) that will randomly match one of several option values.  The hitch is, each value is on a separate line.   I want to be able to find "F1C" OR 'ENU", etc.  (See code snippet)

There are several places in the code where the same coding convention is used.

This is what I have so far:

<SELECT class='fontc' NAME='CA_LANGUAGE' onChange='enableUpdate\(\);'>\n<OPTION VALUE=''selected = '1'>\D*</OPTION>\n<OPTION VALUE='\S{3}'>\w*</OPTION>

It will find the first value, but I would like it to be able to find any option value with the parent tag of "NAME='CA_LANGUAGE'Start Free Trial
1:
2:
3:
4:
5:
<SELECT class='fontc' NAME='CA_LANGUAGE' onChange='enableUpdate();'>
<OPTION VALUE=''selected = '1'>Select a language</OPTION>
<OPTION VALUE='F1C'>French</OPTION>
<OPTION VALUE='ENU'>English</OPTION>
<OPTION VALUE='ESM'>Spanish</OPTION>
[+][-]07.16.2008 at 10:00AM PDT, ID: 22017876

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 10:07AM PDT, ID: 22017949

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 10:17AM PDT, ID: 22018048

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 01:14PM PDT, ID: 22019693

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:23PM PDT, ID: 22030514

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628