Gowtham C
2013-10-22 02:37:24 UTC
hi,
I need to trim white spaces in front and at the end of a string. i was able
to remove white spaces in front but I couldn't remove the spaces at the
end.
Can anyone help me with this one?
*Code:*
input {
stdin{}
}
filter {
grok {
match => [ "message", "%{SPACE}%{GREEDYDATA:message2}" ]
}
mutate {
replace => [ "message", "%{message2}" ]
}
output{
stdout{
debug => true
codec =>json
}
}
*Input:*
(SPACES) Hello Every One (SPACES)
*Note:*
Number of Spaces vary on each input and i need to get the string "Hello
Every One"(with spaces between them)
I need to trim white spaces in front and at the end of a string. i was able
to remove white spaces in front but I couldn't remove the spaces at the
end.
Can anyone help me with this one?
*Code:*
input {
stdin{}
}
filter {
grok {
match => [ "message", "%{SPACE}%{GREEDYDATA:message2}" ]
}
mutate {
replace => [ "message", "%{message2}" ]
}
output{
stdout{
debug => true
codec =>json
}
}
*Input:*
(SPACES) Hello Every One (SPACES)
*Note:*
Number of Spaces vary on each input and i need to get the string "Hello
Every One"(with spaces between them)
--
Remember: if a new user has a bad time, it's a bug in logstash.
---
You received this message because you are subscribed to the Google Groups "logstash-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to logstash-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Remember: if a new user has a bad time, it's a bug in logstash.
---
You received this message because you are subscribed to the Google Groups "logstash-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to logstash-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.