fishfork has asked for the wisdom of the Perl Monks concerning the following question:
A mathematical program I wrote in C++ multiplies things called B and C together then finds some properties of the new thing.
The output gives the thing, for example
BCBCBCBCBCCCB
then a list of porperties.
I am now writing a perl script to process this output.
I want to replace
BCBCBCBCBCCCB
by
(BC)^{5}CCB
which is obviously a lot nicer.
However, I some of the 'words' start with C and the number of (BC)s ranges from 0 to some very large numbers.
How do I achieve this? I tried a few ideas but none of them worked and now I really don't have a clue what to do!
Thanks for reading,
Richard.
richard@sigma.ndo.co.uk
Edit by tye to preserve formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Converting BCBCBCBCBCCCB to (BC)^{5}CCB
by gmax (Abbot) on Feb 06, 2002 at 14:54 UTC | |
|
Re: Converting BCBCBCBCBCCCB to (BC)^{5}CCB
by talexb (Chancellor) on Feb 06, 2002 at 15:42 UTC | |
|
Re: Converting BCBCBCBCBCCCB to (BC)^{5}CCB
by particle (Vicar) on Feb 06, 2002 at 17:26 UTC | |
|
Re: Converting BCBCBCBCBCCCB to (BC)^{5}CCB
by belg4mit (Prior) on Feb 06, 2002 at 14:37 UTC |