Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Anything that is not ',' except .... RegEx question

by Punitha (Priest)
on Feb 27, 2008 at 12:47 UTC ( #670615=note: print w/replies, xml ) Need Help??

in reply to Anything that is not ',' except .... RegEx question

Hi Win, you can try like this also,

use strict; while(<DATA>){ chomp; if(($_!~/,/i)||($_=~/,(?= (?:city of|country of))/i)){ print "$_\n" } }


Replies are listed 'Best First'.
Re^2: Anything that is not ',' except .... RegEx question
by Win (Novice) on Feb 27, 2008 at 14:18 UTC

    Is it possible to incorporate this into the regex I have shown in the question please? One issue I can see with the regex above is that there needs to be a space between the "," and the follow string City of|County of.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://670615]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-10-22 05:27 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (292 votes). Check out past polls.