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

Re: Searching variables with regex?

Expand Messages
  • Paul
    One more thing Sherri, ... I m opening a file to process (and i m learning by doing...) so I have to run the code (somehow) on the opened file. As I
    Message 1 of 35 , Oct 4, 2010
    • 0 Attachment
      One more thing Sherri,

      > I have no idea about the rest of it, but if you put the cursor at beginning of the file

      I'm opening a file to process (and i'm learning by doing...) so I have to run the code (somehow) on the opened file. As I understand I have to actually open the file to process it.

      Anyway, for what it's worth here's what I nutted out so far.

      ;start of clip
      ;The Clip will Spin an article based on the random selection of alternative words bound in curly brackets, separated by the pipe character. Parameters to set include the base file and the number of permutations to generate.

      ;Prompt for file name to spin and number of permutations required.
      ^!Set %SpinFile%="^?{(T=O)File to Spin=^**}"; %Perm%=^?{(S=4)Permutations=50}
      ;End the procedure if no file is specified
      ;^!IfTrue ^$IsEmpty("^%File1%")$ End

      ;initialise variable %cycle% for loop number
      ^!Set %cycle%=001

      ;Set output file name in a variable
      ^!Set %OutputFile%=^$GetName("^%SpinFile%")$^%cycle%.txt
      ^!Prompt [OutputFile=^%OutputFile%]

      ;Set Path to Sub-Directory of input file
      ^!Set %Path%=^$GetPath("^%SpinFile%")$Spun\

      ;Create sub-directory for spun articles
      ;Testing shows this needs no error checking!
      ;Does not create error if AlreadyExists.
      ^!MkDir ^%Path%

      ^!Continue [Do You Want To Proceed?]
      ;Up to coding here. :)
      ;plus some search code to work with, thanks!!!

      ^!Find "\{(([^{}]++|(?R))*)\}" RS1
      ^!IfError Next Else Skip
      ^!Prompt No More Matches
    • 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.