[vlc-devel] [vlc-commits] cue.lua: simplify pattern matching

Jean-Baptiste Kempf jb at videolan.org
Sun Jan 8 00:52:31 CET 2012


On Sun, Jan 08, 2012 at 12:50:49AM +0100, Pierre Ynard wrote :
> > On Sat, Jan 07, 2012 at 01:36:33PM +0100, Pierre Ynard wrote :
> > > +	return string.match( header, "FILE.*WAVE%s*[\r\n]+" ) or
> > > +	       string.match( header, "FILE.*AIFF%s*[\r\n]+" ) or
> > > +	       string.match( header, "FILE.*MP3%s*[\r\n]+" )
> > 
> > How is this still matching \n only files ?
> 
> [\r\n]+ means one or more characters that are either \r or \n. So it
> works.

Ok.

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list