in reply to Re^4: Matching range of text with another string in between
in thread Matching range of text with another string in between

$/ is endofline (see perldoc perlvar). At this point I no longer trust your data file and would use a dump program to verify that the sequence \r\nCAS*\r\n exists in the file.

  • Comment on Re^5: Matching range of text with another string in between