Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Possible Duplicate:
How to create multiline strings

is it a way to assign following text to a variable more easily:

line 1
line 2 
line 3 

instead of:

 t="line 1\nline 2\nline 3";

I want copy and paste some text to test some RexExt on it without modifying every ones.

share|improve this question

marked as duplicate by Pumbaa80, mplungjan, Quentin, Perception, bmargulies May 13 '12 at 18:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Why not paste it in a textarea and grab the value? Alternatively wrap in a div –  mplungjan May 13 '12 at 7:37
    
@mplungjan I need preserve \n \t ... –  PHPst May 13 '12 at 8:19

1 Answer 1

up vote 1 down vote accepted

You may try this site. Not automatic but pretty faster than manual

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.