If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

there is something about being the parent of a very small child a child who has not yet begun to form words that has exerted a subtle pressure on the way i think about language in general my investment in words is heavy and more or less literal in the sense that they are the means by which i make at least in theory my living since my son was born six months ago the first way in which my relationship with words has changed is this i haven't been able to get nearly enough of the words down on paper

I won't interfere with this as NogDog is already helping, but it does look seemingly similar to previous posts we've dealt with.
Just one concern I have to both of you with the array based search and replaces, is that you could potentially overlap replaced words as it goes through your replacement arrays, possibly expanding the sentence unintentionally.

The requirement in this thread seems more complex than in the other. As there are now multiple replacement phrases for the same word, so now you have to keep record of what has been used, and if you reach the end do you start with the first phrase again?

$input_data = <<<EOD
Testing 1, 2, 3. John Smith is about to be a jerk. He is John's friend and lives across the road John J. Smith is a good person, but John is living about 1 mile away !!! The end
EOD;

As mentioned before you have overlaps on the replacements, not just with the word "away" but also the word "about" in one of the initial replacements.
I did one as well for you to look at, I have used the boundary option in the regular expression as well:

-- Original --
Testing 1, 2, 3. John Smith is about to be a jerk. He is John's friend and lives across the road John J. Smith is a good person, but John is living about 1 mile away !!! The end
-- Markers --
Testing 1, 2, 3. {WORD_1} is {WORD_2} be {WORD_5} jerk. He is {WORD_4}'s friend and lives {WORD_3} road {WORD_0} is {WORD_5} good person, but {WORD_4} is living {WORD_6} 1 mile away !!! The end
-- Final --
Testing 1, 2, 3. John Smith: 456 Elm St is {about to|nearly|on the point of|will|just about to} be {a|some|a very|a definite|a specific|a particluar} jerk. He is John: 123 Main St's friend and lives {across the|around the|all over the|over the|through the|round the|all around the} road John J. Smith: 531 Park Ave is {a|some|a very|a definite|a specific|a particluar} good person, but John: 123 Main St is living {about|regarding|concerning|with regards to} 1 mile away !!! The end

That error is because you have a "/" before your "\b", and "/" is your regexp delimiter. Not sure if you really mean to have it there, but if you do want a literal "/", you will have to escape it (or else use a different delimiter).

"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation