capturing-group Questions

3

Solved

This is the second part of a series of educational regex articles. It shows how lookaheads and nested references can be used to match the non-regular languge anbn. Nested references are first int...

2

This is what I'm doing a = "%span.rockets#diamonds.ribbons.forever" a = a.match(/(^\%\w+)([\.|\#]\w+)+/) puts a.inspect This is what I get #<MatchData "%span.rockets#diamonds.ribbons.forever...
Silicium asked 6/9, 2010 at 2:12

1

Solved

Part of a series of educational regex articles, this is a gentle introduction to the concept of nested references. The first few triangular numbers are: 1 = 1 3 = 1 + 2 6 = 1 + 2 + 3 10 = 1...
Hesson asked 2/9, 2010 at 13:43

6

Solved

Let's say we have the following input: <amy> (bob) <carol) (dean> We also have the following regex: <(\w+)>|\((\w+)\) Now we get two matches (as seen on rubular.com): <...
Covered asked 2/7, 2010 at 12:46

2

Solved

In scala.util.matching.Regex trait MatchData I see that there support for groupnames , I thought that this was related to (Regex Named Capturing Groups) But since Java does not support groupnames...
Mccourt asked 12/6, 2010 at 18:17

3

Solved

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I'd specifically like to know if it's possible under the .NET Platform.
Ecker asked 12/6, 2010 at 15:19

© 2022 - 2024 — McMap. All rights reserved.