So what ur saying is that u want to do a lot of substitutions in one pass.
U could always have one s///g for each thing u want substituted and run it n
times.  Can u post some actual strings that u want to parse and the
substitutions?  Then we can figure it out.

At 10:58 PM 10/9/05 +0300, =?iso-8859-1?Q?Veli-Pekka_T=E4til=E4?= wrote:
>That was the problem abstractly put, here's the specific instance:
>I'm writing a program to convert notes given in the music macro language to 
>their equivalent pitches that are applied using markup tags for speech 
>synthesizers. I can match a note easily, and have functions for computing 
>the pitch and the tag in question. As the note values don't depend on each 
>other in any way, I'd like to completely process one note at a time, doing 
>the replacement, and then continue matching the next note where it 
>previously left off. Naturally there are other tokens than just notes in the 
>input so I need to maintain the position of the note data in the input 
>string. If I modify a separate copy of the string, it will throw off the 
>pos() indeces because the substitutions will change the length of the copy.





--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede malis"

00000100

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to