On Jan 30, Rob Dixon said:

>Justino Berrun wrote:
>> hello amigos
>>
>> how would i express some where before/first and some where
>> after/later in a string for example, if (match this "-key" before
>> this "5L" ){ do the rest... }
>> on a string that look like so: $string="-key 3345 -door 3432 -5L";
>
>I think I understand. You want to check that a string starts with
>'-key' and ends with '-5L'. You'll need a regular expression with
>these ingredients:

He may not want the ^ and $ anchors, so /-key.*5L/ might suffice.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to