suggestions for VIN parsing

Ben Finney ben+python at benfinney.id.au
Fri Dec 26 01:58:24 EST 2014


Vincent Davis <vincent at vincentdavis.net> writes:

> Any comment on using pyparsing VS regex

A full-blown parser (with ‘pyparsing’) is overkill for this.

Even regular expressions isn't needed.

The built-in text type (‘str’) in Python 3 should have everything you
need; you only need to match prefixes. No need in this task to go beyond
‘str.startswith’, from what I can tell.

-- 
 \      “We are stuck with technology when what we really want is just |
  `\                                 stuff that works.” —Douglas Adams |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list