Skip to main content
14 events
when toggle format what by license comment
Nov 22, 2020 at 6:00 history tweeted twitter.com/StackSoftEng/status/1330390574491443201
Nov 18, 2020 at 7:57 answer added Jörg W Mittag timeline score: 5
Nov 18, 2020 at 5:42 comment added Filip Milovanović I mean, if you're primarily interested in not repeating the overall pattern, for simple scenarios, you can just use the same template string "#{m[0]}:#{m[1]}@#{m[2]}" to both generate both the full regex, and to interpolate your strings.
Nov 18, 2020 at 5:00 answer added Kain0_0 timeline score: 0
Nov 18, 2020 at 2:49 answer added Pierre-Antoine Guillaume timeline score: 1
Nov 18, 2020 at 2:30 answer added Karl Bielefeldt timeline score: 0
Nov 18, 2020 at 2:05 history edited Jonathan Allard CC BY-SA 4.0
Put back scope explanation. Some people are commenting that there is no guarantee for the output to match the pattern, which was the point in the first place.
Nov 18, 2020 at 1:15 comment added user1937198 And to reverse replace each regex with its capture.
Nov 18, 2020 at 1:14 comment added user1937198 Well, you'd have to start by restricting it to regards where any choice in the regex was covered by a capture, so for practical purposes only constant strings can be outside. So a concatenation of constant strings and regexes that capture the full match, that only match if all match?
Nov 18, 2020 at 0:19 comment added Theraot I believe the idea is to generate a text template that will produce the original text, based on the regex and the string that matched.
Nov 17, 2020 at 23:41 history edited Robert Harvey CC BY-SA 4.0
Removed dictionary reverse-lookup request, and small detail which didn't seem to contribute to the question.
Nov 17, 2020 at 22:59 comment added Kain0_0 Are you suggesting reversing the string and checking it against a pattern? If so its simply pattern matching.
Nov 17, 2020 at 22:52 review Close votes
Nov 22, 2020 at 3:08
Nov 17, 2020 at 22:29 history asked Jonathan Allard CC BY-SA 4.0