Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: simultaneous ... and ___

  • To: mathgroup at
  • Subject: [mg60882] Re: simultaneous ... and ___
  • From: "borges2003xx at" <borges2003xx at>
  • Date: Sun, 2 Oct 2005 01:54:35 -0400 (EDT)
  • References: <dhj4ll$smo$><dhlc4l$cuj$>
  • Sender: owner-wri-mathgroup at

sorry but for a refuse (copy and paste ) i write
m1[{___, x1__ .., x2___ ..., x3___ ..., ___, x3___ ..., x2___ ...,
      x1__ .., ___}] := {}
/; (Length[{x1}] + Length[{x1}] + Length[{x1}]) >= 15
m1[l1_] := l1

the real version is
m1[{___, x1__ .., x2___ ..., x3___ ..., ___, x3___ ..., x2___ ...,
      x1__ .., ___}] := {}
/; (Length[{x1}] + Length[{x2}] + Length[{x3}]) >= 15 (or 5 or...)
m1[l1_] := l1

i apologies
i use triple ___ for x2 and x3 cause i don't want to be filled always
with something

>x2___... mean that the sequence x2 may be empty
>and this "nothing" can be
>repated zero or more times, even a empty list
>contain "nothing" zero more times
>repeated. Than you look for the case that
>and that mean that "nothing" may appear a second
>time zero or more times.

>You don't realy expect that Mathematica will
>understand this ? and it seems that
>you also don't understand what you are writing.

my intention perhaps in wrong way is to have a substring that
eventually cannot exist repeated one  or more time.
show me you how to do this

thanx for your help

  • Prev by Date: Re: Rounding?
  • Next by Date: Re:A programming puzzle
  • Previous by thread: Re: simultaneous ... and ___
  • Next by thread: Re: simultaneous ... and ___