I'm trying to use rtrim but when it sees a period it does not remove just the period. It removes extra characters too. I've tried escaping it but I get the same result. I know I'm doing something wrong but I can't figure out how to fix it. Can anyone tell me if there's a way to have rtrim see the period as a period and just remove it? Or any other suggestions? Thanks.
$to$=<someaddress@somedomain.com.procmail>
eval new_to=ltrim(rtrim(to,".procmail>"),"<")
The result is:
$new_to$=someaddress@somed
If I try the following I get the same result
eval new_to=ltrim(rtrim(to,"\.procmail>"),"<")
I'm trying to get
Try this
...| eval new_to=replace(replace(to,".procmail>",""),"<","")
OR (overwrite same field)
...| rex field=to mode=sed "s/(\<)(\S+)(\.procmail\>)/\2/g"
Try this
...| eval new_to=replace(replace(to,".procmail>",""),"<","")
OR (overwrite same field)
...| rex field=to mode=sed "s/(\<)(\S+)(\.procmail\>)/\2/g"
Replace worked. Thank you!