You are right Mr. Dekel. But now I reached to a good conclusion. To summarize,
using perl to manipulate the text is useless and very very risky. because it
will replace even the header of the file, e.g. if I want to index the word
LyX it will change the very first line of the file:
"#LyX 1.3 created this file. For more info see http://www.LyX.org/" which will
render the file useless. The same applies to the other LaTeX commands and
package names. Am I right?
Anyway, I have found a better solution that's to export the LyX file to LaTeX
in any editor (say Kate) and then tell it to replace all of the occurrences
of whatsoever with whatsoever\index{whatsoever}. Isn't this a better
solution?
Thanks a lot for enlightening the way to me.
في 2:27 م خميس 06 مارس 2003، Dekel Tsur كتبت:
> I think it should be
> perl -pi -e 's:is:$&\n\\begin_inset...'
> as the previous command will delete the occurrences of 'is' in the text.
>
> Even better:
> perl -pi -e 's:\bis\b:$&\n\\begin_inset...'
> to much 'is' to complete words (and not to 'this' for example).
--
Munzir Taha,
M$ Office User Specialist, (MOUS),
Certified Internet Webmaster, (CIW),
New Horizons Computer Learning Centers,
Riyadh, Saudi Arabia