Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Help: Regular expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123037] Help: Regular expressions
  • From: Shizu <slivo.vitz at msa.hinet.net>
  • Date: Mon, 21 Nov 2011 04:28:00 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

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