I have this preword and regex:
let regex = Str.regexp "\\([A-Za-z0-9]\\.*[A-Za-z0-9]\\)";;
let s = "--O--c-a-l**9+===";;
My regex is matching for a string that begins with a letter or number, has 0 to as many character in between, and ends with a letter or number. So the substring "O--c-a-l**9+
" should match.
But when I see if my preword matches my regex, it keeps saying it doesn't match
Str.search_forward regex s 0;;
Exception: Not_found.
And I'm not sure what I'm missing in my regex for it to not match my string.