1 | HTTP | ^~
1 | HTTP | ^~&<?1;?;-unp~xn~lP4WM}~!0%#8?;+5vl9`#ep3q6X1772goci3fj`nc7M1?`"*"#&1 ?;?=>k4NQ="#$3(> | 20180115 | 17
1 | HTTP| ^~�3����������������粷���������������ܬ�� | 20180123 | 07
1 | HTTP | 5g | 20180123 | 09
1 | HTTP | `6$pct{z`ChagykbmsvDlbeu0)d&`{f/d80l18m`29VYei1&49dw1/g~fOvt!%3iv"3U;9(!>%4pfbbyn | 20180117 | 14
1 | HTTP | ^~!7c{cxg | 20180117 | 11
1 | HTTP | ^~89>0&9fjefdT\3=2&=86sgzd | 20180117 | 12
1 | HTTP | ^~8)rzk)+tar.8?0,%:?&3&<)>4.81;1#++(pqzwglgl:*fq05nfu13;1p17:g&hal5u?b<a&<bm`%++(cxnhzk`aj | 20180115 | 12
1 | HTTP | `a`ih$mmdzb | 20180117 | 17
1 | HTTP | ^~�a>mj[^RTYU\oe#WRNEH]C_D | 20180123 | 12
1 | HTTP | ^~Cookie:**** | 20180117 | 13
1 | HTTP | ^~Cookie:***�H�O��:��pd�����L]��Ie(���T��MT��(���� | 20180117 | 18
1 | HTTP | ^~Cookie:****N:^L:��4R�W0�{б�#��Z��r | 20180118 | 00
1 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=17) | 22974464 | 24
1 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=17) | 35905339 | 66
1 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=17) | 40861664 | 30
1 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=18) | 03727721 | 39
2 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=19) | 20170727 | 12
9 | HTTP | Rejection Reason": "Malformed line with incorrect number of fields (expected=35,actual=19) | 20180115 | 00
Tried gsub to eliminate but it is not working.
awk -F '[|]' '{gsub(/^~*/,"",$3)}; {print $3}' filename
Please guide how should i handled the regex pattern strings.