#!/usr/bin/perl use 5.018; my $RLine = "R.N. Raox, J. Pure and Appl. Phys."; my $Jrnl = qr/Appl. Phys./; if( $RLine =~ /(.+)( and | & )($Jrnl)$/ ) { #NB trailing space before the journal name print "11: $1\n"; print "33: $3\n"; print "Matched\n"; } else { print "Not Matched\n"; }