Posts by leviramsey@social.vivaldi.net
 (DIR) Post #AQ6ds6zupXVL9JwI2y by leviramsey@social.vivaldi.net
       2022-11-29T18:19:27Z
       
       0 likes, 0 repeats
       
       @RL_Dane @sotolf @benjaminhollon @marcxjo Scala's is nice:"""\brom\b""".r.unanchored is effectively the same (if I remember my Perl right) as qr/\brom\b/.
       
 (DIR) Post #AQ6ds7wPK4IC4jJ0DY by leviramsey@social.vivaldi.net
       2022-11-29T18:52:00Z
       
       0 likes, 0 repeats
       
       @sotolf @RL_Dane @benjaminhollon @marcxjo triple quote means not having to escape backslashes in the string.
       
 (DIR) Post #AQ6ds913KHbPPQUE64 by leviramsey@social.vivaldi.net
       2022-11-29T18:57:01Z
       
       0 likes, 0 repeats
       
       @sotolf @RL_Dane @benjaminhollon @marcxjo It's not really different from what Nim has to do with r"".
       
 (DIR) Post #AQ6dsAI6aMpxMbTMJc by leviramsey@social.vivaldi.net
       2022-11-29T19:08:00Z
       
       0 likes, 0 repeats
       
       @sotolf @RL_Dane @benjaminhollon @marcxjo r"" doesn't compile a regex (see https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals), just builds a raw-string, which a subsequent call compiles into a regex
       
 (DIR) Post #AQ6dsAoMeQdoyeZ7b6 by leviramsey@social.vivaldi.net
       2022-11-29T19:03:51Z
       
       0 likes, 0 repeats
       
       @sotolf @RL_Dane @benjaminhollon @marcxjo Where it gets really nice is with captures and general pattern matching:val Regex = """\bfoo=(\S+)\b""".r.unanchored"baz=qux foo=bar thingy=dingy" match {  case Regex(foo) => println(s"foo is $foo")  case _ => println("No foo :(")}
       
 (DIR) Post #AQ6dsBrElEX8DquviK by leviramsey@social.vivaldi.net
       2022-11-29T19:12:36Z
       
       0 likes, 0 repeats
       
       @sotolf @RL_Dane @benjaminhollon @marcxjo So the Nim equivalent to Scala's """\bfoo\b""".r.unanchored would be re(r"\bfoo\b") while the Nim equivalent to Scala's """foo.*bar""".r would be re(r"^foo.*bar$") AFAICT
       
 (DIR) Post #AUE5rM49Jbk0mYkLGS by leviramsey@social.vivaldi.net
       2023-04-02T01:36:46Z
       
       0 likes, 0 repeats
       
       @lauren Thankfully, this is not a case where we can say, "Tom Lehrer did it first".