Hi folks

Thank you for all your replies. I think I am still struggling to find a solution to my issue using "Str.regexp", and using Pcre-ocaml needs some time to be familiar with as there is no enough examples and discussion on it.

Ill put my issue again as if someone can help me to find a solution to it with the "Str" .

I want to define regular expression and after that I want to check if particular string is a prefix of the given regular expression.

Example: a* | (aba)* so when you test "abaaba" the result will be true (complete match) and when we check "abaa" the result is true as well but when we check "abb" the result is false.

I look forward to your suggestions.

Cheers,
Zaid