chuck
chuck copied to clipboard
Regex replacement interprets periods as including newlines
<<< RegEx.replace(".*", "...", "foo\nbar") >>>;
Expected output: "...\nbar"
Actual output: "..."
To rectify this, one needs to rewrite the pattern as "[^\n]*"
.
Thanks- just to confirm, what operating system did you see this on? Oddly enough we use different regex backends depending on the OS.
This is on Arch Linux, with ChucK 1.3.5.2.