Tensegritics / ClojureDart

Clojure dialect for Flutter and Dart
1.44k stars 91 forks source link

Re-seq has different output in CLJ and CLJD #269

Closed zikajk closed 1 year ago

zikajk commented 1 year ago

Describe the bug Regex function has dfifferent output in CLJ and CLJD

To Reproduce

  1. Run (->> "1900-01-01 Mon 12:12" (re-seq #"(\d{4})-(\d{2})-(\d{2}) (\w{3})(?: (\d{1,2}):(\d{2})(-(\d{1,2}):(\d{2})|.*)?)?") first) in Clojure and it returns ["1900-01-01 Mon 12:12" "1900" "01" "01" "Mon" "12" "12" "" nil nil]

  2. But ClojureDart returns ["1900-01-01 Mon 12:12" "1900" "01" "01" "Mon" "12" "12" nil nil nil]

Expected behavior Same result

dupuchba commented 1 year ago

going to check this after work, thanks for the report @zikajk

dupuchba commented 1 year ago

ok, not a bug, clojurescript has the same behavior, Dart RegExp engine matches the Javascript one (hence the cljs one)

zikajk commented 1 year ago

Thanks for the info, I got burned when I wanted to use the existing CLJ library :-).

dupuchba commented 1 year ago

sorry about that