Tag: pattern-matching

96 What best practices or performance considerations are there for choosing between Cases, Position, Pick and Select? 2012-01-17T21:10:34.680

78 Using a PatternTest versus a Condition for pattern matching 2012-02-16T02:12:09.547

53 How is pattern specificity decided? 2012-07-23T07:46:01.457

52 How to generally match, unify and merge patterns? 2012-03-14T01:13:25.923

44 Find zero crossing in a list 2012-09-14T15:36:35.043

37 Why is StringExpression faster than RegularExpression? 2013-05-22T15:52:37.567

35 Looking for "Longest Common Substring" solution 2012-05-28T16:46:06.247

33 How to Combine Pattern Constraints and Default Values for Function Arguments? 2012-05-01T02:06:15.383

33 How do I perform string matching and replacements? 2012-06-18T20:03:09.597

32 Why (and when) does pattern matching with f[__] perform MUCH more quickly than _f? 2016-11-12T21:46:40.907

31 Make my data-structure atomic 2014-10-08T13:21:09.453

30 Fetching data from HTML source 2012-03-23T02:24:59.277

29 How can I ensure that I am constructing patterns in the most efficient way possible? 2012-01-19T02:29:44.670

29 Pattern to match a non-empty list of non-empty lists 2012-02-03T23:33:57.237

29 Why doesn't PatternTest work with Composition? 2012-02-13T16:37:22.813

29 Strange behavior with Cases and Position with SetDelayed 2015-08-19T16:20:21.327

28 Using patterns in pure functions 2012-03-19T08:32:36.453

28 Find subsequences of consecutive integers inside a list 2013-04-19T12:14:52.747

27 replacement rules from a pattern and a matching expression 2013-01-12T06:40:39.953

27 Count works differently depending on how an association was created 2017-04-29T02:15:47.247

26 Elegant and fast way to join all string sequences 2013-06-27T08:57:00.470

26 Is there a GraphicsPrimitiveQ (or a complete list of Heads of graphics primitives)? 2015-07-15T21:04:41.333

26 Detecting components in timeseries 2016-01-27T04:48:59.857

26 Version inconsistency with optional arguments: what if the default value doesn't match the pattern? 2016-02-29T10:58:25.647

25 Detecting patterns of black and white stones on a 2D board 2014-04-23T03:08:32.753

24 How to match a pattern with a pattern? 2012-03-10T13:41:38.257

24 How can a big table be treated as a database? 2012-09-26T22:49:52.170

24 Quick way to use conditioned patterns when defining multi-argument function? 2014-07-04T06:20:25.440

23 Finding the period of an array of integers 2015-04-17T12:16:07.740

23 Mysterious behaviour of Pick 2016-06-24T01:49:23.737

22 Determine whether some expression contains a given symbol 2012-08-23T17:31:49.863

22 Pattern does not match with Orderless head 2015-09-11T07:28:23.203

22 What has changed in pattern matching functions with the Orderless attribute? 2016-07-26T22:13:18.323

22 How to replace all elements of a list by a rule "element" -> "element_" 2019-12-06T00:23:57.343

21 How to use subscript in pattern names? 2012-03-12T22:47:34.690

21 Pattern that matches colors 2012-11-30T01:09:14.273

21 What does f_[whoCalled]^:=f really mean? 2014-12-11T08:17:57.013

21 Can Mathematica convert a RegularExpression into a StringExpression or vice-versa? 2016-02-27T04:38:58.940

20 NotebookFind and String Pattern Expressions 2012-05-12T08:02:15.683

20 The difference between 0. and 0 2012-06-18T19:49:43.090

20 Position of a pattern-matched part of an expression 2013-02-04T19:28:40.533

20 How to get Cases to wrap results in an arbitrary head? 2013-09-06T05:19:37.620

20 MatchQ-ing Associations (MMA 10) 2014-07-22T04:19:07.310

19 Using Position (which requires a pattern) in the same manner as Select (which requires a criterion) 2012-06-30T00:34:25.147

19 How to enumerate all possible binary associations? 2013-11-27T10:04:53.190

19 Confused by the opts : OptionsPattern[ ] pattern 2015-06-06T22:26:31.490

19 How to define a recursive pattern? 2015-06-11T14:37:40.063

19 What is the difference between defining a function and specifying the type of argument, versus applying a test to that argument? 2015-12-10T13:46:05.390

19 Unexpected behaviour when pattern matching with Longest 2016-02-24T14:57:33.507

18 Passing down arguments 2012-02-17T07:44:33.033

18 Split a string at specific positions 2012-03-16T12:22:15.167

18 Splitting a list 2012-06-12T22:59:18.577

18 Should I use \\\" or \" to match " in RegularExpression? 2012-06-22T22:57:56.657

18 Returning an unevaluated expression with values substituted in 2012-07-04T16:21:04.083

18 How can I separate a separable function 2012-07-10T14:33:02.910

18 Why is ReplaceAll behaving like this? 2013-04-08T15:18:48.833

18 Unexpected pattern matching behaviour: PatternSequence vs. Optional 2015-01-22T15:14:00.340

18 Orderless and Sequence 2015-11-30T14:24:27.353

17 Match patterns on list of Strings 2012-04-19T15:05:58.150

17 Calling Table with custom iterator 2012-06-17T22:52:50.970

17 Grabbing a number of characters around a string pattern 2012-08-09T08:47:00.227

17 Bug in RepeatedNull? 2013-11-11T23:22:16.057

17 Is it possible to change the order that symbol definitions are checked? (DownValues vs UpValues) 2015-09-20T20:24:31.050

17 Highlighting pattern strings in a large text 2015-10-01T09:09:16.290

16 Is pure pattern matching without PatternTest and Condition Turing-complete? 2012-04-30T14:12:05.957

16 Pattern issues weird warning 2012-05-21T22:33:43.013

16 Specifying string patterns in DeleteCases 2012-07-31T21:58:32.860

16 Counting negative values in list 2012-08-20T11:22:11.760

16 I can't use PatternSequence with Cases 2013-04-17T08:24:16.283

16 Recognizing special cases of a defined function for permuted arguments 2014-07-23T21:36:25.853

16 Orderless pattern matching 2015-01-10T15:27:49.430

16 Bug: x === y but results of a /@ x and a /@ y differ? 2016-08-25T20:05:28.790

15 Successful match in Replace but not in Cases? 2012-05-02T13:12:12.747

15 What's wrong with this pattern of the form Except[Repeated[....]]? 2012-05-20T15:56:34.347

15 Selectively clear DownValues 2012-07-06T10:57:26.157

15 Getting number of binary digits combinations without "forbidden" patterns 2012-11-13T10:02:43.277

15 Make mathematica treat $e_i^2$ as numeric 2012-12-27T00:03:52.177

15 How to match a cyclically repeating sequence? 2014-03-11T14:25:38.437

15 Delete redundant {x,y} pairs 2017-03-20T23:35:35.963

14 Split a Unicode string maintaining uppercase characters 2012-04-01T21:27:43.797

14 How can I mix the behaviors of StringReplace and ReplaceAll in a single rule? 2012-04-14T05:27:50.967

14 Delete duplicates in a list, depending on the sequence of numbers 2012-05-19T19:19:35.423

14 How to match expressions with a repeating pattern 2012-09-24T19:18:16.177

14 What does `: Hold[$IterationLimit]` mean? 2013-05-05T15:20:45.470

14 Pattern matching on Orderless functions inside Hold 2013-08-09T13:27:49.893

14 Pattern to match L, but not L[_] 2013-09-25T18:44:04.727

14 Using Except with strings 2013-12-28T18:01:05.253

14 How to detect loops in a vector field? 2015-08-27T01:50:39.850

14 Named patterns in Except 2015-12-12T11:00:18.683

14 Matching HoldPattern expressions 2016-04-17T18:54:52.833

14 Opposite of Alternatives in a Rule 2016-05-30T21:02:51.840

14 Pattern matching with List and Optional 2016-08-25T16:07:07.753

14 What types of string patterns can't be translated into regexes and hence do not work? 2016-09-02T11:55:17.510

14 Replace elements that do not match a pattern 2017-07-05T10:20:47.710

13 The gap between MapAt and ReplacePart for 2D data tables with headers 2012-08-09T21:30:50.183

13 Assessing argument type in set delayed function definitions 2012-08-12T22:45:08.770

13 Soft-Match String Comparison 2013-03-04T14:37:19.263

13 Question about using a pattern in ReplacePart 2013-03-06T07:43:17.677

13 Apply N only outside a certain function 2013-07-30T12:40:42.850