Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: pattern example

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119815] Re: pattern example
  • From: Arturo Amador <arturo.amador at ntnu.no>
  • Date: Fri, 24 Jun 2011 07:44:11 -0400 (EDT)
  • References: <201106231125.HAA25887@smc.vnet.net>

Hola Francisco,

I have copied/pasted the command you sent and I get the output from the book...

--
Arturo Amador Cruz
Stipendiat				Norges Teknisk-Naturvitenskapelige Universitet (NTNU)
						Institutt for Fysikk
						Fakultet for Naturvitenskap og Teknologi
						H=F8gskoleringen 5, Realfagbygget, E5-108
Telefon					(735) 93366		NO-7491 TRONDHEIM
										
NORWAY
arturo.amador at ntnu.no



On Jun 23, 2011, at 1:25 PM, Francisco Gutierrez wrote:

> I find in Leonid's (Shiffrin) excellent book the following example (p. 122):
> f[3/5,4,5,2/3]/.f[x:(_Integer|_Rational)..]:>{x}
>
> According to the book, this returns {3/5,4,5,2/3}
>
> However, I get (Mathematica 8.0.1, Windows 7) f[3/5,4,5,2/3]
>
> What's wrong?
> Francisco
>



  • References:
  • Prev by Date: parsing a strig
  • Next by Date: what's in a name? (legal and conventional constructions of identifiers)
  • Previous by thread: Re: pattern example
  • Next by thread: Re: pattern example