
perlisgreat
Novice
Aug 13, 2009, 2:18 AM
Views: 2812
|
Hi, I have a string in log file from that i need to pick the username. the string is like this--
pid 2172 tid 3124: 160: 10110847: userName :[app@abc.com] pid 2172 tid 3124: 160: 10110847: userName :[napp@abc.com] pid 2172 tid 3124: 160: 10110847: userName :[12345] pid 2172 tid 3124: 160: 10110847: userName :[app@abc_sde.com] pid 2172 tid 3124: 160: 10110847: userName :[567890] pid 2172 tid 3124: 160: 10110847: userName :[dfgehj] I want to take all the usernames here in the snippet. The code i have gives only the numeric part. The output i am expecting is --
app@abc.com napp@abc.com 12345 app@abc_sde.com 567890 dfgehj Suggest to handle special characters in the username. Thanks NT
(This post was edited by perlisgreat on Aug 13, 2009, 4:37 AM)
|