RE: regex for &
- From: stewart.anderson@xxxxxxxxxxxxx (Stewart Anderson)
- Date: Thu, 30 Oct 2008 10:14:40 -0000
-----Original Message-----fail).
From: Brent Clark [mailto:brentgclarklist@xxxxxxxxx]
Sent: 30 October 2008 09:57
To: beginners@xxxxxxxx
Subject: 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
#! /usr/bin/perl
This is what I so far.
print $_ if $_ !~ /\&|Victoria \&/ig;
Im struggling to get this right.
TIA.
use warnings;
use strict ;
while (<DATA>) {
print $_ if $_ !~ /\&|Victoria \&/ig;
}
__DATA__
This is a nice hotel.
The view & food is good.
We are at the Victoria & Alfred Hotel.
Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.
.
- References:
- regex for &
- From: Brent Clark
- regex for &
- Prev by Date: Re: regex for &
- Next by Date: Re: regex for &
- Previous by thread: Re: regex for &
- Index(es):
Relevant Pages
|