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.

Scala pattern matching on sequences other than Lists

I have the following code which recursively operates on each element within a List def doMatch(list: List[Int]): Unit = …

scala collections pattern-matching
Replace HTML codes with equivalent characters in Java

Currently I'm working on converting HTML codes with equivalent characters in java. I need to convert the below code to …

java pattern-matching matcher
Filter S3 list-objects results to find a key matching a pattern

I would like to use the AWS CLI to query the contents of a bucket and see if a particular …

amazon-s3 pattern-matching aws-cli jmespath
Remove all lines before a match with sed

I'm using sed to filter a list of files. I have a sorted list of folders and I want to …

regex perl sed awk pattern-matching
How do I perform a case-sensitive search using LIKE?

I'm trying to find records that contain a string of 6 or more alpha-numeric characters in uppercase. Some examples: PENDING 3RDPARTY …

sql-server-2008 pattern-matching sql-like collate
What is 'Pattern Matching' in functional languages?

I'm reading about functional programming and I've noticed that Pattern Matching is mentioned in many articles as one of the …

functional-programming pattern-matching terminology
Pattern matching SQL on first 5 characters

I'm thinking about a SQL query that returns me all entries from a column whose first 5 characters match. Any ideas? …

sql pattern-matching ansi-sql-92
Scala - case match partial string

I have the following: serv match { case "chat" => Chat_Server ! Relay_Message(serv) case _ => null } The problem is …

string scala pattern-matching
In regex, match either the end of the string or a specific character

I have a string. The end is different, such as index.php?test=1&list=UL or index.php?list=…

javascript regex pattern-matching
OCaml: Match expression inside another one?

I'm currently working on a small project with OCaml; a simple mathematical expression simplifier. I'm supposed to find certain patterns …

pattern-matching ocaml