[OS X TeX] [OT] Need Perl Regex for...

Herbert Schulz herbs at wideopenwest.com
Sat Sep 20 13:11:47 EDT 2008


Suppose I have a sentence like

Here are some words <fnameA>.<fnameB>.<ext> and more text afterward.

where <fnameA> and <fnameb> may have spaces/tabs in them and you may  
assume <ext> has no spaces/tabs. Can one of you Perl experts out there  
(I know you're there!) give me a Perl regex that would pick out only  
the <fnameA>.<fnameB.<ext> part of the line. Can it be generalized to  
include multiple <fname> sections separated by `.'

The best I've been able to do is .*?\.\S which wouldn't allow spaces  
in <fnameB> or other sections.

By the way this is indirectly related to TeX! :-)

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

More information about the MacOSX-TeX mailing list