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
I need to watch .*\.ml$ and .*\.mli$ files. I think regex `.*.ml.?$" ought to work, but it doesn't, so I need to add two filters. Should '?' work? (This is using the C API of libfswatch.)
Thanks
The text was updated successfully, but these errors were encountered:
Note the -E to switch into "extended" regexp mode.
A general tip for writing regexps: putting .* at the start or end of a pattern doesn't change anything, unless you are using a function that specifically anchors at the beginning or end of a string, or only matches against the entire string.
For example, in Python, re.match() only matches at the beginning of a string, but re.search() matches anywhere in the string. Most of the time unless you're told otherwise, a regexp will match anywhere in the string. In fswatch, it definitely matches anywhere in the string.
Hi,
I need to watch
.*\.ml$
and.*\.mli$
files. I think regex `.*.ml.?$" ought to work, but it doesn't, so I need to add two filters. Should '?' work? (This is using the C API of libfswatch.)Thanks
The text was updated successfully, but these errors were encountered: