'Efficient' is whether an alternative regular expression benchmarks faster than an existing solution. I'm looking for an approach that validates floats, or any other complex 'thing' embedded in a string, with a single regex rather than the two-step approach in the example, and no, I did not (yet) attempt a solution that extracts multiple float candidates from a single string (/g is likely). An example is just that, an example, that one can build on once one understands the limitations of one approach and the additional capabilities of an alternative approach. I tried to make it clear in my write-up that I am trying to build on lots of experience and knowledge gained from studying Friedl, without access to anything later (he used 5.8.8) or more advanced than Friedl. Cookbook, 2nd takes the regex technology only up to 5.14, so it misses the mark too on illuminating the regex state-of-the-art. More to do...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.