perl regex: negative lookahead between two characters -


how include pattern between 2 characters in regular expression?

say wanted print in below text apart words in between " "

this "example".  "is" "an" example.  "this" example. 

this i've tried far, think i'm missing something:

m/(?!"(.*)").*/g 

$s = 'this "is" "an" example'; @words = ($s =~ /"([^"]*)"/g); 

@words contains words between " "


Comments

Popular posts from this blog

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -

c - ALSA programming: how to stop immediately -