Hi there, I am having some trouble with a regex and am hoping on one of you great folks can assist me. I am very weak with regular expressions just to give you guys a heads up.
Here is the text I am using a regex on:
Control flow 6881 Server 0.01 Kbps 5089.59 Kbps
BitTorrent 6881 Server 0.01 Kbps 6963.48 Kbps
Control flow 6881 Server 0.01 Kbps 6653.03 Kbps
BitTorrent 47649 Server 0.01 Kbps 6033.00 Kbps
Control flow 47649 Server 0.01 Kbps 6432.94 Kbps
BitTorrent 47649 Server 0.01 Kbps 6014.99 Kbps
Here is the regex I am using that grabs the download speed at the end:
("([0-9]{1,5}\\.[0-9]{1,2})");
I need to change this regex/create new regex to grab the download speed at the end, but only on the lines that start with BitTorrent.
Here is what I tried:
("[^BitTorrent]+([0-9]{1,5}\\.[0-9]{1,2})");
However that regex is giving me an error later on in my code when I go to convert the string to a double.
If anyone can give me any help I would greatly appreciate it. Also if you need me to give any more information just let me know.
Bonus points - If anyone could show me a regex that will grab the download speed at the end on lines that contain 6881 I would be stoked.