That's easy to process with sscanf, see example:
char buf1[100], buf2[100];
if (sscanf(str, "/apiv1/data/%99[^/]/%99[^/]/", buf1, buf2) == 2) {
printf("[%s] [%s] \n", buf1, buf2);
}
On Thu, Oct 30, 2014 at 11:52 AM, Carlos Tangerino <
[email protected]> wrote:
> Anyone using the SLRE library?
> I would appreciate if someone could help me to decrypt this expression
>
> I do have a REST API like
>
> */apiv1/data/1,2/sum/2000-01-01T00:00:00/2000-01-01T00:00:00/n*
> /apiv1/data/1,2,3/op/startdate/enddate/aggregation
>
> Where:
>
> /apiv1/data - fixed text
> 1,2,3 - A list of one or more integers separated by a comma (if more than
> one)
> op - List of exact words as example (sum|max|min)
> Start and End Data - A date in the format 2000-01-01T00:00:00
> Aggregation - List of exact words as in (year|month|day|hour)
>
> Thanks in advance
> Carlos
>
> */apiv1/data/1,2/sum/2000-01-01T00:00:00/2000-01-01T00:00:00/n*
>
> --
> You received this message because you are subscribed to the Google Groups
> "mongoose-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mongoose-users.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.