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

Herbert Schulz herbs at wideopenwest.com
Sat Sep 20 19:11:47 CEST 2008


Howdy,

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)



-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
List Archive: http://tug.org/pipermail/macostex-archives/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex



More information about the macostex-archives mailing list