Advertisement

09.01.2008 at 06:31AM PDT, ID: 23693664 | Points: 500
[x]
Attachment Details

Perl regular expression match

Asked by mhouldridge in CGI Scripting, Regular Expressions

Tags:

Experts,

I have a string as follows:

=?something?B?somethingelse?=

I need to take the string parts between each "?"

Here's my regex to check if a string matches:

if ($string =~ m/\?([^\?]+)\?/){
$match = "yes";
}

Is my regex correct?
Start Free Trial
[+][-]09.01.2008 at 06:43AM PDT, ID: 22360138

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.

 
[+][-]09.01.2008 at 07:58AM PDT, ID: 22360884

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.

 
[+][-]09.01.2008 at 02:07PM PDT, ID: 22362821

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