7

Perl regexp help

view full story
linux-howto

http://www.unix.com – Hi, I have file like below: Code: 1|1212|34353|5fdf 6575||dfgdg sfsdf |afsf||4|aasfbc|~1213~~~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf |affsf| |4|abc|~rwarw~~asa~~~123~312313 1|1212|34353|5fdf 6575||dfgdg sfsdf |afasfs||4|aasfdbc|~564564~~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf ||sfsdf|4|abdfdc|~1~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf ||adfadf|4|dfdabc|~rwarw~~~ I am trying to print only upto last pipe like below: Code: 1|1212|34353|5fdf 6575||dfgdg sfsdf |afsf||4|aasfbc| 1|1212|34353|5fdf 6575||dfgdg sfsdf |affsf| fsd|4|abc| . . . I am using the code below: Code: #!/usr/local (HowTos)