Reputation: 5
I need to pull "processor" and everything after in the string. I'm trying to figure this out with Regex
.
\\aaronmartinez\processor(0)\% idle time
\\aaronmartinez\processor(1)\% idle time
\\aaronmartinez\processor(2)\% idle time
\\aaronmartinez\processor(3)\% idle time
\\aaronmartinez\processor(4)\% idle time
\\aaronmartinez\processor(5)\% idle time
\\aaronmartinez\processor(6)\% idle time
\\aaronmartinez\processor(7)\% idle time
\\aaronmartinez\processor(_total)\% idle time
Upvotes: 0
Views: 60
Reputation: 30995
You can use a simple regex like this:
(processor.*)
As you asked, the idea is to capture processor
and everything else with .*
Match information:
MATCH 1
1. [15-39] `processor(0)\% idle time`
MATCH 2
1. [55-79] `processor(1)\% idle time`
MATCH 3
1. [95-119] `processor(2)\% idle time`
MATCH 4
1. [135-159] `processor(3)\% idle time`
MATCH 5
1. [175-199] `processor(4)\% idle time`
MATCH 6
1. [215-239] `processor(5)\% idle time`
MATCH 7
1. [255-279] `processor(6)\% idle time`
MATCH 8
1. [295-319] `processor(7)\% idle time`
MATCH 9
1. [335-364] `processor(_total)\% idle time`
Upvotes: 2