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


Groups > comp.soft-sys.math.mathematica > #4584 > unrolled thread

Re: Replace

Started byMurray Eisenberg <murray@math.umass.edu>
First post2011-08-26 09:29 +0000
Last post2011-08-26 09:29 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Replace Murray Eisenberg <murray@math.umass.edu> - 2011-08-26 09:29 +0000

#4584 — Re: Replace

FromMurray Eisenberg <murray@math.umass.edu>
Date2011-08-26 09:29 +0000
SubjectRe: Replace
Message-ID<j37p2f$4jb$1@smc.vnet.net>
Did you make a typographic error and really mean to type "5/6"? While an 
expression such as (5|6) is a legitimate Mathematica expression, it is 
not evaluated further with those arguments. However, the | symbol is a 
special input for for the function Alternatives, which may be used to 
form patters for patter-matching purposes; is that what you want?

If not, then please explain further what you want. Are you starting with 
actual length-2 lists of integers or, instead, lists of strings 
representing those integers? Do you want the raw (5|6) type expression 
or a string looking like that.


On 8/25/11 7:06 AM, Sam Korn wrote:
> Hi, another stupid question. I have a list, and each element in the list is
> a sublist with a pair of integers. How do I replace each element along the
> lines of "{5,6}" with "(5|6)"?
>
> I know it's a stupid question, and there's probably something really obvious
> I'm missing, but I'm really new to Mathematica.
>
> Thanks!
> -Sam
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web