-1

I have the following string:

<center>DB Results:</center><center><b><br>ripster.ultima</b></center><center><b><br>raghav.jhavar</b></center></center></td></tr></table>

I want to extract "ripster.ultima" and "raghav.jhavar", so I used the following regex:

(?<=<center><b><br>)(.*)(?=<\/b><\/center>)

Now, this works in some cases, but not in all: https://regex101.com/r/imO8A8/4

In the link above, the first example is a single line. When I put in a single line, it does not select the individual strings. However, if its separated by a new line as seen in the second example, the strings I want are highlighted.

How do I get the strings in the first example?

RaghavJhavar
  • 29
  • 1
  • 5

1 Answers1

-1

You don’t need to group the first and the last patterns

<center><b><br>(.*?)<\/b><\/center>
Daniel Butler
  • 3,239
  • 2
  • 24
  • 37