by wolfeyes333 at 2013-01-29 11:30:35
I’m trying to match the last number the string below which has to be equal to 1, can you please guide me how I can go about doing this. I want to search through logs and extract all the lines that end in the number 1 at the end of the string.by ArtB0514 at 2013-01-29 11:35:27
acct-b-2013-01-29-0053.csv:d,2013-01-29 11:54:38-0500,2013-01-29 11:54:38-0500,Diane@barmal.id,email@example.com,relayed,2.0.0 (success),smtp;250 Queued (0.109 seconds),mail.i.com (18.104.22.168),api,smtp,22.214.171.124,74.06.10.2,“SIZE,AUTH,AUTH:LOGIN”,6709,bal3038,1,1
Match a string that ends in the numeral 1:by wolfeyes333 at 2013-01-29 11:40:52
$String -match "1$"
Thanks for the response, if the match the string that ends in 1 then it may include string where the number after the last comma is for example 341 which is not what I want to include. I would want the string to match if the number after the last column is equal to 1. I’ll check the link that you provided.by DonJ at 2013-01-29 12:03:51
Then make it ",1$"by wolfeyes333 at 2013-01-29 12:11:12
Thanks, I’ll try that. You saved me a lot of time.