Hi
I'm familiar with Perl's substr and index functions, although I can't seem to find a simple way to combine them in order to match to a specific index within a block of text and then replace this substring with a new piece of text. The only simple way I can think to do it would be using regular expressions, although there's a danger that I'll end up replacing the subtring if it occurs more than once.At present I have a hash with, 'trigger_start', 'trigger_end' and 'trigger_text' for the substring I'm interested in each time. I'm iterating through the substrings backwards so that any replaced text won't need to offset any of the other substring positions.
Thanks very much
In reply to Replace text at given index by danj35
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |