mirror of
https://github.com/lsdlsd88/JC4827W543.git
synced 2026-03-21 17:49:26 +00:00
24 lines
483 B
Plaintext
24 lines
483 B
Plaintext
#include <Regexp.h>
|
|
|
|
void setup ()
|
|
{
|
|
Serial.begin (115200);
|
|
|
|
// match state object
|
|
MatchState ms;
|
|
|
|
// what we are searching (the target)
|
|
char buf [100] = "The quick brown fox jumps over the lazy wolf";
|
|
ms.Target (buf); // set its address
|
|
|
|
unsigned int count = ms.MatchCount ("[aeiou]");
|
|
|
|
Serial.println (buf);
|
|
Serial.print ("Found ");
|
|
Serial.print (count); // 11 in this case
|
|
Serial.println (" matches.");
|
|
|
|
} // end of setup
|
|
|
|
void loop () {}
|