I beg to differ.
My general principle is to be lax on what I receive and
strict on what I emit.
So I try to write my regexen as lax as possible and to
"synchronize" my match on characters/sequences I am sure
will be present
in the input. This means that I often use .*?
in my regexen. Using the greedy counterpart will lead to
a lot of backtracking and more so geometrically with the
number of .*?
Also I incrementally build my regexen
testing them on samples: non greedy match also is
less a nuisance here when examining the matches.
Regexen are a tricky art and I like to
abuse it at (*) the risk of being called demented.
(*) And I beg to disagree with Felix Gallo, France is the
lang of semiology, not of semiotics...
and hair splitting too, BTW. And, on a related field,
tagmemics foray in France is collateral to the introduction of american
camelides but has yet to appear widely in French.
tagmemique is indeed French neologism that googlewhacks until the present node
stefp (qui aime couper les cheveux en quatre)-- check out TeXmacs
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||