python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Extract all the matched groups of a regular expression in a string
Is there a way to extract in one call all the matched subgroups of a string according to a regular expression.
I have a date like this:
Thu, 07 Apr 2022 15:03:32 GMT
And I created the following regexp...

Lhooq
Votes: 0
Answers: 2
What is the best way to ensure a regex in OCaml matches the entire input string?
In OCaml, I'm trying to check if a regex matches the entire input string, not just a prefix or a suffix or the potion of the input string before the first newline.
For example, I want to avoid a regex...
Alex Blanck
Votes: 0
Answers: 2
Longest prefix of an OCaml `string list` ending in a specific `string` value
I am trying to work out whether there is a particularly neat or efficient way of truncating a string after the final occurrence of a specific element. For my purposes, it is a monomorphized string lis...
archaephyrryx
Votes: 0
Answers: 1
Ocaml Custom Data types
type expr =
| Plus of expr * expr (* a + b *)
| Minus of expr * expr (* a - b *)
| Times of expr * expr (* a * b *)
| Divide of expr * expr (* a / b *)
| Va...
Blendic
Votes: 0
Answers: 1