MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Help: Regular expressions


Hello,

    Would anybody tell me what's the difference between these two -- with amd without "^"?
    Regular expressions are not easy for me!


In= StringSplit["line1\nline2\nline3", RegularExpression["(?m)^"]] // InputForm

Out= {"line1\n", "line2\n", "line3"}

In= StringSplit["line1\nline2\nline3", RegularExpression["(?m)"]] // InputForm

Out= {"l", "i", "n", "e", "1", "\n", "l", "i", "n", "e", "2", "\n", "l", "i", 
 "n", "e", "3"}

    Thanks in advance.



  • Prev by Date: Loop problem
  • Next by Date: How to do quickest
  • Previous by thread: Re: Loop problem
  • Next by thread: Re: Help: Regular expressions