ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
so this will replace the word 'not' every time you type it into a textarea,
i used the regex to avoid replacing 'not' in words like 'another',
the problem i am having now is that the function replaces words that start with not if you are a slower typer than the script running,
so words like 'noteworthy', get changed before one can type the 'eworthy',
i thought to specify each possible ending word scenario, such as new lines, spaces, punctuation et al, but i instead looked if there was an easier way and was unable to find one, so before i tackd a slue of special characters onto the back of the word i thought i'd ask the community if they knew a way
Last edited by cin_; 07-27-2013 at 05:21 AM.
got some help from the stacks ...
i'll put the solution here for posterity :
//let's talk regex ::
//^ beginning of input,
// | or,
// [^a-z] match everything but a-z,
// no is the word,
// (?=[^a-z]) only match if equal to characters other than a-z,
// /g global,
// i ignore case
// $1 places last character into this position
that's very deformed by simplification. Specifically, you only treat [a-z]/i as letters that make up a word. What about German, Turkish or Finnish umlauts, what about French or Spanish accented letters, what about Greek or Cyrillic letters? And that's just European scripts, just the tip of the iceberg, there are many more characters that should be considered part of a word.