cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1497
Views
5
Helpful
1
Replies

EEM Applet Capturing Multiple Words

Jason Kopacko
Level 2
Level 2

I am trying to capture the words at the end of this line:

209     9341567  71629995        130  0.47%  0.25%  0.20%   0 Spanning Tree

But no matter what regexp I build, I can only match the first word. This is what is getting the first word:

 action 5.42   regexp " ([a-zA-Z]+)" "$cpuline" match cpuline_name

Now, I can change the "plus sign" into ".*" but when the results are output into the syslog message, it has the "carriage return" in the result variable (which I do NOT want).

I have tried

  • [a-z A-Z]
  • [a-zA-Z ]
  • [ a-zA-Z]
  • [_a-zA-Z_]
  • [a-zA-Z\s]
  • [a-zA-Z.]

The list is too long to finish out....Any one have any ideas?

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

[a-zA-Z[:space:]]+ or [a-zA-Z ]+