regex for &



Hiya

I have three sentences.

This is a nice hotel.
The view & food is good.
We are at the Victoria & Alfred Hotel.

I need a perl regex / code to not print out sentence 2 (basically fail).

This is what I so far.

print $_ if $_ !~ /\&|Victoria \&/ig;

Im struggling to get this right.

TIA.

Regards
Brent Clark
.



Relevant Pages

  • Re: regex for &
    ... The view & food is good. ... We are at the Victoria & Alfred Hotel. ... I need a perl regex / code to not print out sentence 2. ...
    (perl.beginners)
  • RE: regex for &
    ... The view & food is good. ... We are at the Victoria & Alfred Hotel. ... I need a perl regex / code to not print out sentence 2 (basically ...
    (perl.beginners)
  • RE: regex for &
    ... The view & food is good. ... We are at the Victoria & Alfred Hotel. ... I need a perl regex / code to not print out sentence 2 (basically ...
    (perl.beginners)