I'm trying to make my code more readable but still try have as much sense as possible, I would like to test a string vs a few regex patterns.
( re-find #"(?i)(^select .* from .*)|(^delete from me)" c))
And I would like to split this into 2 separate patterns but maybe use one test? is there anything that would test a set of patterns vs 1 string?
Thanks!
(def patterns [#"(?i)^select .* from .*" #"(?i)^delete from me"])
(when (some #(re-find % "your test string") patterns)
...)
clojure.core/some
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With