Top "Pattern-matching" questions

Use this tag for questions about testing whether a data structure has a particular shape or contains particular values in certain locations.

Javascript fuzzy search that makes sense

I'm looking for a fuzzy search JavaScript library to filter an array. I've tried using fuzzyset.js and fuse.js, …

javascript regex pattern-matching string-matching fuzzy-search
What does `:_*` (colon underscore star) do in Scala?

I have the following piece of code from this question: def addChild(n: Node, newChild: Node) = n match { case Elem(…

scala pattern-matching
How can I tell if a string repeats itself in Python?

I'm looking for a way to test whether or not a given string repeats itself for the entire string or …

python string pattern-matching
How to override apply in a case class companion

So here's the situation. I want to define a case class like so: case class A(val s: String) and …

scala pattern-matching case-class
How to pattern match multiple values in Scala?

Let's say I want to handle multiple return values from a remote service using the same code. I don't know …

scala pattern-matching
Does PostgreSQL support "accent insensitive" collations?

In Microsoft SQL Server, it's possible to specify an "accent insensitive" collation (for a database, table or column), which means …

sql postgresql localization indexing pattern-matching
Python regex string matching?

I'm having a hell of a time trying to transfer my experience with javascript regex to Python. I'm just trying …

python regex pattern-matching
Powershell find users expiring in 7 days

I am trying to run a powershell script that queries for accounts that expire within 7 days, I currently have $a = (…

powershell active-directory pattern-matching user-accounts
What is the command to match brackets in Emacs?

What is the command to match brackets in Emacs (the equivalent of the % command in Vim)?

linux emacs pattern-matching editor gnu
How do I compare two arrays in scala?

val a: Array[Int] = Array(1,2,4,5) val b: Array[Int] = Array(1,2,4,5) a==b // false Is there a pattern-matching way to see …

arrays scala pattern-matching