Question: How do I use regex to convert 

```
11111aA$xx1111xxdj$%%`

```

to 

```
aA$xx1111xxdj$%%

```

So, in other words, I want to remove (or match) the FIRST grouping of `1`'s.

Answer: 
Depending on the language, you should have a way to replace a string by regex. In Java, you can do it like this:

```
String s = "11111aA$xx1111xxdj$%%";
String res = s.replaceAll("^1+", "");

```

The `^` "anchor" indicates that the beginning of the input must be matched. The `1+` means a sequence of one or more `1` characters.

Here is a [link to ideone](http://ideone.com/MhsdN) with this running program.

The same program in C#:

```
var rx = new Regex("^1+");
var s = "11111aA$xx1111xxdj$%%";
var res = rx.Replace(s, "");
Console.WriteLine(res);

```

([link to ideone](http://ideone.com/fGilt))

In general, if you would like to make a match of anything only at the beginning of a string, add a `^` prefix to your expression; similarly, adding a `$` at the end makes the match accept only strings at the end of your input.
If you only want to replace consecutive "1"s at the beginning of the string, replace the following with an empty string:

```
^1+

```

If the consecutive "1"s won't necessarily be the first characters in the string (but you still only want to replace one group), replace the following with the contents of the first capture group (usually `\1` or `$1`):

```
1+(.*)

```

Note that this is only necessary if you only have a "replace all" capability available to you, but most regex implementations also provide a way to replace only one instance of a match, in which case you could just replace `1+` with an empty string.