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

1. Originally Posted by Scott Lambert
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,

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. 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.

Scott

3. Originally Posted by Scott Lambert
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.

Scott
Scott,

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

Thanks again,

-peter

4. ## Scott, Your macro works like a charm.

Originally Posted by Scott Lambert
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