List Info

Thread: Rgex to insert variable value in text




Rgex to insert variable value in text
user name
2006-02-09 22:52:53
Hello everyone,

I have lists in the form of

value=1664
some text TOKEN some more text
a lot of text on this line but no token
(...)
some text TOKEN some more text
a lot of text on this line but no token
some text TOKEN some more text
a lot of text on this line but no token
value=1665
some text TOKEN some more text
a lot of text on this line but no token
(...)
some text TOKEN some more text
a lot of text on this line but no token
some text TOKEN some more text
a lot of text on this line but no token
value=1666
(...)

I would like to replace each occurence
of TOKEN by the preceding content
of value.

I use the JGsoft products.
Any help is much appreciated

JCT

------------------------------------------------------------
-------
Jean-Claude Terrier, trad. a.         SOGETRA - Translators
& Consultants
jterriersogetra.com                    translatsogetra.com
Voice/Fax: 514-842-3888
8090 San Francisco Ave BROSSARD  Qc  Canada J4X 1Y4
------------------------------------------------------------
------- 


Rgex to insert variable value in text
user name
2006-02-09 23:54:49
On 2/9/06, Jean-Claude Terrier <jterriersogetra.com> wrote:
>
> Hello everyone,
>
> I have lists in the form of
>
> value=1664
> some text TOKEN some more text
> a lot of text on this line but no token

This is only a partial solution -- if there was a value for
each
token, I could do it pretty easily using this find/replace
tested
here:
http://tinyurl.com/8j9zh

However, I'm not sure how to re-use the captured value on
consecutive
tokens.  Would be good to know.  If it is possible to do
this with a
single query, someone else on this list more capable than I
ought to
be able to lend a hand.

A.

--
Remember, no matter where you go, there you are. -Buckaroo
Banzai
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )