You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3395 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: John Skaller
Version: 3.0.8.1
OS: linux
Submission from: ppp194-89.lns1.syd2.internode.on.net (203.122.194.89)
let m = Str.regexp "a";;
let b = Str.string_match m "aa" 0;;
print_endline (if b then "YES" else "NO");;
prints YES. Clearly the string "aa" is NOT matched by
the regexp "a".
This would be the correct result for the
Str.string_partial_match
function which matches prefixes. However Str.string_match
should match the whole string or return false.
[This problem arose using Str.string_match to find
filenames with extension .mli .. it picked up
files that didn't end in .mli .. I worked around it
using $, but that will not suffice if the string
contains newlines]
The text was updated successfully, but these errors were encountered:
Original bug ID: 3395
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: John Skaller
Version: 3.0.8.1
OS: linux
Submission from: ppp194-89.lns1.syd2.internode.on.net (203.122.194.89)
let m = Str.regexp "a";;
let b = Str.string_match m "aa" 0;;
print_endline (if b then "YES" else "NO");;
prints YES. Clearly the string "aa" is NOT matched by
the regexp "a".
This would be the correct result for the
Str.string_partial_match
function which matches prefixes. However Str.string_match
should match the whole string or return false.
[This problem arose using Str.string_match to find
filenames with extension .mli .. it picked up
files that didn't end in .mli .. I worked around it
using $, but that will not suffice if the string
contains newlines]
The text was updated successfully, but these errors were encountered: