in reply to Re: Regex - remove characters (pattern not terminated)
in thread Regex - remove characters (pattern not terminated)

Thanks for the help! However, I would like to do a little bit more than just remove 6 characters following the pattern; I would like to remove the pattern as well as the 6 preceding/following characters.

The following did remove the 6 following characters but I would like to integrate the pattern into the regex so that it will also be removed.:
$temp_seq =~ s/^($tag_seq)\w{6}(.*)/$1$2/;
Any suggestions?

Replies are listed 'Best First'.
Re^3: Regex - remove characters (pattern not terminated)
by almut (Canon) on Jun 29, 2010 at 19:05 UTC
    I would like to remove the pattern as well as the 6 preceding/following characters.

    Actually, that's even easier; see my other reply.

      Ahh thank you!! I don't know how I overlooked before, but forgive me! I'm going to try and implement the reverse pattern and I'm sure I'll run into more problems! I'll keep you update. Thanks again!!