Static regex for embedded systems

Liste des GroupesRevenir à ca embedded 
Sujet : Static regex for embedded systems
De : pozzugno (at) *nospam* gmail.com (pozz)
Groupes : comp.arch.embedded
Date : 21. Jan 2025, 15:31:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmob4o$3ssqn$2@dont-email.me>
User-Agent : Mozilla Thunderbird
Many times I need to parse/decode a text string that comes from an external system, over a serial bus, MQTT, and so on.
Many times this string has a fixed syntax/layout. In order to parse this string, I everytime create a custom parser that can be tedious, cumbersom and error prone.
For example, suppose you have to decode a string from a modem that uses AT commands. Many answers from the modem has the following schema:
   \r\n+<prefix>: <field1>,<field2>\r\n
   \r\nOK\r\n
The prefix is known, the number and type of fileds are known too. With regex, the parser would be simple.

Date Sujet#  Auteur
21 Jan 25 * Static regex for embedded systems11pozz
21 Jan 25 +- Re: Static regex for embedded systems1David Brown
21 Jan 25 `* Re: Static regex for embedded systems9Stefan Reuther
21 Jan 25  `* Re: Static regex for embedded systems8pozz
21 Jan 25   +- Re: Static regex for embedded systems1Hans-Bernhard Bröker
22 Jan 25   +- Re: Static regex for embedded systems1Niocláiſín Cóilín de Ġloſtéir
22 Jan 25   `* Re: Static regex for embedded systems5George Neuner
22 Jan 25    +* Re: Static regex for embedded systems2David Brown
23 Jan 25    i`- Re: Static regex for embedded systems1George Neuner
22 Jan 25    `* Re: Static regex for embedded systems2Stefan Reuther
23 Jan 25     `- Re: Static regex for embedded systems1George Neuner

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal