Home > Mobile >  How to regex second string within "
How to regex second string within "

Time:03-11

I have following file:

"2022-03-06","44.192.246.120"
"2022-03-06","3.81.184.162"

And I want only to match between the second ". So that the output is:

44.192.246.120 3.81.184.162

CodePudding user response:

Try this: (?<=")[^"] (?="$)

Matches only the words that are at the end of the string.

The matches only the IPs:

44.192.246.120
3.81.184.162

https://regex101.com/r/Mob6yW/2

CodePudding user response:

This matches the stuff between the ":

https://regex101.com/r/AlHpXQ/1

The regex: (?<=")([^,"\s]*)(?=")

Matches:

2022-03-06
44.192.246.120
2022-03-06
3.81.184.162
  • Related