long lines

Discussion in 'Perl Misc' started by Xenos, Oct 28, 2004.

  1. Xenos

    Xenos Guest

    Hi. Is there a way to continue very long reg. ex. lines on mutliple lines?
    I tried using a backslash at the end of line which works in other languages,
    but Perl seemed to treat the escaped newline as part of the expression. I
    have some very complex reg. ex. that span many columns that I would like to
    break up across multiple lines for readability. Is there a way to do this?


    Thanks,

    DrX
     
    Xenos, Oct 28, 2004
    #1
    1. Advertising

  2. Xenos wrote:
    > Hi. Is there a way to continue very long reg. ex. lines on mutliple
    > lines? I tried using a backslash at the end of line which works in
    > other languages, but Perl seemed to treat the escaped newline as part
    > of the expression. I have some very complex reg. ex. that span many
    > columns that I would like to break up across multiple lines for
    > readability. Is there a way to do this?


    That's what the /x modifier is for.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Oct 28, 2004
    #2
    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. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    754
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,248
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    519
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    854
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    1,902
    veryhotsausage
    Jul 4, 2008
Loading...

Share This Page