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.