long lines

X

Xenos

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
 
G

Gunnar Hjalmarsson

Xenos said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top