I got strings which go:
abc123abc123abc123
abc123
abc123abc123abc123abc123abc123abc123
etc (varying units of abc123 which I don't know the length of repeat)
The task is to extract the first 1 and first a and the last c and last 3. Is it possible to do it with 1 regex and how exactly if it is possible? I kept count of the repeating units and based on the count I have been able to perform the task with a few regex, but would like to use one regex if possible. Thanks
Edit: In the real situation. It is more like a:(a number)bc:(a number)1:(a number)23:(a number) etc and I have to capture the first a number, the first 1 number, the last c number and the last 3 number.
Jeff
adiffer from any other one?