[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Substitution



>>>>> "JB" == Juanma Barranquero <barranquero@laley-actualidad.es> writes:

JB> -----BEGIN PGP SIGNED MESSAGE-----
JB> Hash: SHA1

JB> On 21 Jun 1999 12:14:00 -0400, Chaim Frenkel wrote:

>> I'd agree with you if the _pattern_ were more complex
>> than fixed strings.

JB> The generic problem (changing $pat to $s1 the first time, and to $s2
JB> afterwards) is the same if $pat is a regular expression, so the
JB> solutions offered do still work.

>> Hmm, Since the replacement text must be unique in the document
>> after replacement,

JB> Why? That's not a precondition of the stated problem.

Isn't this a written language problem. The final result has to be
easily parsed by a human. Consider the problem of the replacement
text colliding with a common word.

	Terriffic Hedging Enterprice (the) was allowed one of the
	seats. We allowed the books to be viewed. Inside the 
	enterprise.

Most likely this is my lack of knowledge of other languages. Most of
these replacements that I (in my limited experience) have seen. The
replacement text is uppercased. Also, in english the original is
a contiguous series of words.

Is this different in Spanish? Is that why you need a regular expression?

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org