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


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

Help: Regular expressions

From Shizu <slivo.vitz@msa.hinet.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Help: Regular expressions
Date 2011-11-21 09:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jad600$eig$1@smc.vnet.net> (permalink)

Show all headers | 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