python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to refer to the last capture group inside Perl code embedded in regex via (?{...})?
I would like to be able to use the last capture group in the Perl code embedded via (?{...})
'foobar' =~ /(oo)(bar)(?{ $word = ${-1} })/
My attempt above fails. I want the variable $word to have the ...
itil memek cantik
Votes: 0
Answers: 2
pass regex group to function for substituting
I have a passage of text that contains VALID dates formatted as dd/mm/yyyy. I need to replace all months to their respective month name.
10/05/1999 -> 10 May 1999
I find dates and capture each part...
quokkas-are-cute
Votes: 0
Answers: 0
Bash Regex Pattern Matching: How To Use Variables Inside of Pattern Variable?
I'm trying to a) scan a string for a pattern match b) save the matches to a list c) filter the matches from the original string.
No matter the regex I use, it just won't match. I think the problem is ...

Emily
Votes: 0
Answers: 1
Matching and Managing Optional Groups in Regex Python
I am trying to match the following string
(Studio) - Film (Year) - Segment Number
The string has to have the following order Studio, followed by Film then optional Year and finally optional (Segment +...

Jason Hudson
Votes: 0
Answers: 1