Loading ...
Sorry, an error occurred while loading the content.

Re: Searching variables with regex?

Expand Messages
  • Paul
    Thanks all for the prompt replies. Sheri, thankyou, that s a nice bit of code to start from. ... e.g. {A{B|C}|D|E} could be parsed by the | s NOT inside a
    Message 1 of 35 , Oct 4, 2010
    • 0 Attachment
      Thanks all for the prompt replies.

      Sheri, thankyou, that's a nice bit of code to start from.
      > ^!Find "\{(([^{}]++|(?R))*)\}" RS1
      > ^!IfError Next Else Skip
      > ^!Prompt No More Matches
      > ;end of clip

      e.g. {A{B|C}|D|E} could be parsed by the |'s NOT inside a bracket, from the outside in, and repeat until no more brackets are found.... The combos that should result would include A{B|C}, D or E which is then resolved to AB or AC, D or E. Hmm... might just work!

      John,
      The purpose of the code is to create variations of a text document by writing-once and marking-up appropriately. e.g. The {quick|fast} brown fox jumped over the {lazy|bone idle} dog.

      In a document containing multiple lines it is easy to see how the number of permutations grows exponentially so rather than cycle through the combinations the subroutine chooses one term at random.

      It's a fairly standard "white hat" technique for generating unique articles that when submitted to different article directories, not only do the readers of each directory get a sample of my best prose, search engines don't penalise me for regurgitating duplicate content.

      Sometimes referred to as spinning, this technique has attracted some bad press because it makes it easy for a pirate to steal some content and spin it as their own.

      However, when I write a precis with a link pointing to my blog where the main content resides, the summary article should be as unique as possible on each of the hand selected directories I submit to.

      Regards,
      Paul
    • Paul
      See? There s always someone ready to apply the rules even when I thought I was doing something harmless?!! sry bout that.. point taken. will visit
      Message 35 of 35 , Oct 11, 2010
      • 0 Attachment
        See? There's always someone ready to apply the rules even when I thought I was doing something harmless?!! <ahem> sry 'bout that.. point taken. will visit over there.....

        --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
        >
        > Paul wrote:
        > > I only stiffly object to copied work when it is purported to be
        > > ones own work. In the early stages of professional development
        > > I advocate reprimand and retraining.
        >
        > This is beginning to drift off the topic od clips, My answer certainly
        > is, which is why I just posted it to the off-topic list.
        >
        > Axel
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.