#12 regular expressions newline

closed
nobody
Editor (71)
5
2002-07-17
2002-07-17
Anonymous
No

I can't seem to get \n to behave the way I expect it
to. When using \n as replacement text, j leaves
replaces the matched text with "n". It also will not
match "\n".

Discussion

  • Peter Graves

    Peter Graves - 2002-07-17
    • status: open --> closed
     
  • Peter Graves

    Peter Graves - 2002-07-17

    Logged In: YES
    user_id=558172

    You're right; this doesn't work right out of the box.

    You need to enable experimental features by adding this line
    to ~/.j/prefs (or C:\.j\prefs):

    enableExperimentalFeatures = true

    Then you should get a "Multiline pattern (experimental)"
    checkbox in the Find and Replace dialogs. If you check this
    box (you have to check the "Regular expression" checkbox
    too), things should work as you expect.

    This feature should graduate from experimental status soon.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks