I have a string that I need to split on a certain character. However, I only need to split the string on one of those characters when it is flanked by digits. That same character exists in other places in the string, but would be flanked by a letter -- at least on one side. I have tried to use the split function as follows (using "x" as the character in question):
my @array = split /\dx\d/, $string;
This function, however, removes the "x" and flanking digits. I would like to retain the digits if possible. Any ideas?