MathGroup Archive 2011

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

Search the Archive

Re: Replace

  • To: mathgroup at
  • Subject: [mg121109] Re: Replace
  • From: Murray Eisenberg <murray at>
  • Date: Sat, 27 Aug 2011 08:19:18 -0400 (EDT)
  • Delivered-to:
  • References: <j35am1$og8$> <>
  • Reply-to: murray at

The expression Alternatives @@@ data does not seem to give what the OP 
seems to have asked for, which is to have each pair of integers not only 
separated by the Alternatives symbol, but also to have each such
m | N surrounded by parentheses. (Which is why in my previously posted 
reply to the OP I asked exactly what sort of result he really wanted.)

On 8/26/11 5:23 AM, Ray Koopman wrote:
> On Aug 25, 4:12 am, Sam Korn<s... at>  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
> Alternatives @@@ data

Murray Eisenberg                     murray at
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

  • References:
  • Prev by Date: Re: Replace
  • Next by Date: Re: decoding inbuilt function
  • Previous by thread: Re: Replace
  • Next by thread: Re: Replace