Use this tag for questions about testing whether a data structure has a particular shape or contains particular values in certain locations.
I just found a bug in some code I didn't write and I'm a bit surprised: Pattern pattern = Pattern.compile("\\…
java regex static pattern-matchingI'm often writing code that compares two objects and produces a value based on whether they are the same, or …
scala pattern-matching extractorMy application log entries are given below: 2015-06-24 14:03:16.7288 Sent request message [649b85fa-bfa0-4cb4-8c38-1aeacd1…
regex pattern-matching logstash-grok square-bracketHow is pattern matching in Scala implemented at the bytecode level? Is it like a series of if (x instanceof …
performance scala pattern-matching bytecodeI have strings like 'keepme:cutme' or 'string-without-separator' which should become respectively 'keepme' and 'string-without-separator'. Can this be done in …
sql string postgresql pattern-matching delimiterI'm looking for a way to emulate something like SELECT * FROM table WHERE attr LIKE '%text%' using a …
postgresql full-text-search pattern-matching tsvectorI'm looking for a way to simplify function patterns when the actual data is not required: data X = A | B …
haskell pattern-matching record algebraic-data-typesWhy does Prolog match (X, Xs) with a tuple containing more elements? An example: test2((X, Xs)) :- write(X), …
prolog tuples pattern-matching operators associativityHello fellow Scala Programmers I have been working with Scala for some month now, however I have a problem with …
scala types pattern-matching case-classMy method is as follows def myMethod(myDouble: Double): Double = myDouble match { case Double.NaN => ... case _ => ... } The IntelliJ …
scala pattern-matching ieee-754 nan