Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to edit my regex to capture the Nth match in an XML file?

$
0
0
Hello all, I am struggling while trying to write a regex to capture the second and third occurrence of a pattern. Here is my example: The Following XML file for instance: eth0192.168.1.1/24xx:xx:xx:xx:xx:xoketh1192.168.1.2/24xx:xx:xx:xx:xx:xok I manage to catch the first `eth0` by doing:<(Name)>(?\D+\d+)(\1)>\n But I can't manage to catch the `eth1` field... Sorry if this is a dumb question... I am new to Regex... I am using https://regex101.com/ to help me out, but I'm stuck.. Can someone help me on this one please? Thanks!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>