Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6591

Help: Regular expressions

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From Shizu <slivo.vitz@msa.hinet.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Help: Regular expressions
Date Mon, 21 Nov 2011 09:34:56 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <jad600$eig$1@smc.vnet.net> (permalink)
Lines 17
NNTP-Posting-Date 21 Nov 2011 08:39:13 GMT
NNTP-Posting-Host 9b577500.news.twtelecom.net
X-Trace DXC=ZicG[T0RfkEk^S9D<aY5lLC_A=>8kQj6M=_1NR_H?JPMAKbS`ITUP@BEFiONJ7[GoF5IF3gf?^YkH
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:6591

Show key headers only | View raw


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.

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Help: Regular expressions Shizu <slivo.vitz@msa.hinet.net> - 2011-11-21 09:34 +0000
  Re: Help: Regular expressions "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-22 10:44 +0000
  Re: Help: Regular expressions James Stein <mathgroup@stein.org> - 2011-11-23 12:04 +0000

csiph-web