c-function to find a simple pattern CHnnnnnX do not use RegEx
$30-50 USD
Complété
Publié il y a plus de 13 ans
$30-50 USD
Payé lors de la livraison
Routine must be pure C (not C++).
Routine must find in a string a pattern
The pattern is
<nobr>CHnnnnnnnX</nobr>
n stand for a number 0-9
X stand for 1-12 characters 0-9 a-z A-Z
Routine should be fast and not use libraries like a RegEx Library.
postivie examples:
string = "bla bla <nobr>CH1000123A1BC</nobr> more bla bla"
string = "<nobr>CH9912345123456789012</nobr>"
negativ examples
string = "bla bla <nobr>XX9912345123</nobr>"
string = "<nobr>CHF</nobr>"
string = "<nobr>CH1212345AAAABBBBCCCC1</nobr>
## Deliverables
Just to add
nnnnnnn is a fixed length of 7 numeric characters.
X is variable length from 1 to 12 alphanumeric characters.