+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: I would like to search for the character 1 but not for 11. Even better not for 1.n.

  1. #11
    Senior Member
    Join Date
    Nov 2014
    Location
    Minneapolis, MN
    Posts
    321
    Quote Originally Posted by Scott Lambert View Post
    Hi Peter,

    I tried to make your second version of the macro work, but no luck. Debugging other people's code is not my talent. I seem to have to write the original code to make it work.

    Which I have done so, and have attached findalpha.vdm which should do what you want.

    Scott
    Thanks Scott,

    I have tried your macro, FindAlpha.vdm and had an issue.

    Specifically, it stopped at the first string of \alpha and then moved the cursor forward one position. That is to say, it stopped at the "a" character of the string
    \alpha.

    Looking forward to hearing your reactions.

    Thanks as always.

    -peter

  2. #12
    Senior Member
    Join Date
    Aug 2011
    Location
    British Columbia, Canada
    Posts
    383
    Hi Peter,

    Sorry, I have my slashes mixed up. I was testing for /alpha and not \alpha.

    on line 10 of macro, change:

    match("/",noerr)

    To:

    match("\",noerr)

    And everything should work.

    Sorry about that.

    Scott
    Using Vedit 6.21.3, (32 bit), dated 9/12/11 running on Windows 7 (64 bit).

  3. #13
    Senior Member
    Join Date
    Nov 2014
    Location
    Minneapolis, MN
    Posts
    321
    Quote Originally Posted by Scott Lambert View Post
    Hi Peter,

    Sorry, I have my slashes mixed up. I was testing for /alpha and not \alpha.

    on line 10 of macro, change:

    match("/",noerr)

    To:

    match("\",noerr)

    And everything should work.

    Sorry about that.

    Scott
    Scott,

    your amended macro works like a charm. In fact I have replaced \alpha by \beta
    and that worked too.

    Thanks again,

    -peter
    Last edited by rejto12; November 11th, 2018 at 02:24 AM.

  4. #14
    Senior Member
    Join Date
    Nov 2014
    Location
    Minneapolis, MN
    Posts
    321

    Scott, Your macro works like a charm.

    Quote Originally Posted by Scott Lambert View Post
    Hi Peter,

    I tried to make your second version of the macro work, but no luck. Debugging other people's code is not my talent. I seem to have to write the original code to make it work.

    Which I have done so, and have attached findalpha.vdm which should do what you want.

    Scott
    Hi Scott, and fellow Vedit Users.

    Your macro works like a charm. Here are the details:

    I am using your macro to find typos in my latex/tex manuscipts. One of the simplest possible typos in such manuscripts is to forget the backslash chracter, " \ ", in front of the command alpha.
    Now in a long manuscript it is nearly impossible to find such a typo. That is to say, it is nearly impossible to find such a typo by hand. That is how your macro comes to the rescue. Specifically, FinAlpha.vdm cand find such a tpo in seconds.

    It is my understnding that latex/tex took over the backslash character from the C/C++ pogramming language. So, I think that that the FindAlpha.vdm macro ought to be better known.


    -peter
    Last edited by rejto12; November 12th, 2018 at 08:09 PM.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts