Hi PerlMonks:

I need to fetch the value next to 'speed' in the following string. 'speed basic-2.0 5.5 basic-11.0'.

I used a regular expression "speed \\w+\" which captured only the string "speed".

--------------------UPDATE---------------------------------------
I need a regular expression which prints everything after the word speed as one string.

my $string = "speed basic-2.0 5.5 basic-11.0" # I require a reg ex which can get me # my $required = "basic-2.0 5.5 basic-11.0"
-----------------END OF UPDATE------------------------------------
Any suggestions provided by you is much appreciated!

2005-10-02 Retitled by planetscape, as per Monastery guidelines
Original title: 'Regular expression'

<ramya2005>2005-10-03 Thanks for everyone for posting answers to my Regular expression question.
Since many people mis interpreted my question and posted answers in a different context I updated the original content.
Thanks for letting me know the guidelines. Now I added my original post content.


In reply to Regular expression with capture following a match by ramya2005

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.