What it is doing finding the required pattern and converting it with spaces. In addition to that what I want is if the found pattern contain any blank lines that should be converted to space equal to the no. of lines found. How it would be possible to do this.$pattern='(\n\s*[0-9]{1,3}\s*\n\s*<page>\s*\n)'; $target_data =~ s/$pa +ttern/" " x length($&)/gie;
In reply to Replacing the pattern by agynr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |