RE explanation

Discussion in 'Perl Misc' started by julia_2683@hotmail.com, May 12, 2005.

  1. Guest

    Could someone give me an explanation for each part of this regular
    expression ?

    /\b((?:(?=[a-z])[^aeiou])*[aeiou](?:(?=[a-z])[^aeiou])*)\b/ig

    Many thanks
     
    , May 12, 2005
    #1
    1. Advertising

  2. wrote:
    > Could someone give me an explanation for each part of this regular
    > expression ?
    >
    > /\b((?:(?=[a-z])[^aeiou])*[aeiou](?:(?=[a-z])[^aeiou])*)\b/ig


    Why? I'd suggest that you look it up at first hand:

    perldoc perlre

    and ask a question if there is anything specific you can't figure out
    that way.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, May 12, 2005
    #2
    1. Advertising

  3. writes:
    > Could someone give me an explanation for each part of this regular
    > expression ?
    >
    > /\b((?:(?=[a-z])[^aeiou])*[aeiou](?:(?=[a-z])[^aeiou])*)\b/ig


    It seems to match words which contain exactly one vowel.

    See perldoc perlre.
     
    Arndt Jonasson, May 12, 2005
    #3
  4. Re: [OT] RE explanation

    Arndt Jonasson wrote:
    > writes:
    >>
    >> /\b((?:(?=[a-z])[^aeiou])*[aeiou](?:(?=[a-z])[^aeiou])*)\b/ig

    >
    > It seems to match words which contain exactly one vowel.


    Doesn't the letter 'y' also count as a vowel in English? (In Swedish it
    does.)

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, May 12, 2005
    #4
  5. Greg Bacon Guest

    Re: [OT] RE explanation

    In article <>,
    Gunnar Hjalmarsson <> wrote:

    : Doesn't the letter 'y' also count as a vowel in English? (In Swedish
    : it does.)

    Yes! Well, maybe.. Hm, maybe not..

    Oh, bother. :-/

    Greg
    --
    Democrats can't imagine that anyone who is -- or thinks he is -- making a
    living would vote for a Democrat for President. What does that tell us
    about the Democratic Party?
    -- Joseph Stromberg on Howard Dean's outreach to "poor whites"
     
    Greg Bacon, May 12, 2005
    #5
  6. Guest

    Re: [OT] RE explanation

    Gunnar Hjalmarsson <> wrote:
    > Arndt Jonasson wrote:
    >> writes:


    >>> /\b((?:(?=[a-z])[^aeiou])*[aeiou](?:(?=[a-z])[^aeiou])*)\b/ig


    >> It seems to match words which contain exactly one vowel.


    > Doesn't the letter 'y' also count as a vowel in English? (In Swedish it
    > does.)


    It does. But also a consonant.

    But then most English people are brought up with the myth of five
    vowels.

    Axel
     
    , May 13, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mariusz

    explanation

    Mariusz, Jan 12, 2004, in forum: VHDL
    Replies:
    1
    Views:
    619
    tbx135
    Jan 13, 2004
  2. Kaladhaur Palaniappa

    Need Explanation

    Kaladhaur Palaniappa, Aug 7, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,028
    Kaladhaur Palaniappa
    Aug 7, 2003
  3. Benjie Fallar

    tracing output explanation

    Benjie Fallar, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    373
    Benjie Fallar
    Jul 15, 2003
  4. George Ter-Saakov

    Do you have an explanation for this?

    George Ter-Saakov, Apr 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    618
    Pravin A. Sable
    Apr 30, 2004
  5. Dave
    Replies:
    4
    Views:
    409
Loading...

Share This Page