Write a regexp string matching function that supports '.', '*' and '.*'
The title is pretty explicit and below are couple of samples input/output:

    'abc' =~ 'abc' (ok)
    'abc' =~ 'a*bc' (ok)
    'aaaaaaabc' =~ 'c*bc' (ko)
    'aaaaaaabc' =~ 'a.*bc' (ok)
    'abbbbaaaaaabc' =~ 'ab*a*b*c' (ok)
    'abbbbaaaaaabc' =~ 'ab*a*h*bc' (ok)
    'bbd' =~ 'b*bbd' (ok)
    'bbd' =~ '.*bbd' (ok)
    'bbd' =~ '.*cbd' (ko)
    '' =~ '.*' (ok)

My implementation for this is located at:

https://github.com/jpbillaud/piexposed/blob/master/string/string_match_regexp.c

Now I was wondering if anybody would think about a more interesting way to solve this using DP, Finite Automata or whatever else.
Write a regexp string matching function that supports '.', '*' and '.*'
===

The title is pretty explicit and below are couple of samples input/output:

    'abc' =~ 'abc' (ok)
    'abc' =~ 'a*bc' (ok)
    'aaaaaaabc' =~ 'c*bc' (ko)
    'aaaaaaabc' =~ 'a.*bc' (ok)
    'abbbbaaaaaabc' =~ 'ab*a*b*c' (ok)
    'abbbbaaaaaabc' =~ 'ab*a*h*bc' (ok)
    'bbd' =~ 'b*bbd' (ok)
    'bbd' =~ '.*bbd' (ok)
    'bbd' =~ '.*cbd' (ko)
    '' =~ '.*' (ok)

My implementation for this is located at:

https://github.com/jpbillaud/piexposed/blob/master/string/string_match_regexp.c

Now I was wondering if anybody would think about a more interesting way to solve this using DP, Finite Automata or whatever else.