Hello friends, I was practicing with Regular expression and I want to delete some columns and I am using the following code
search for: ^([^ ]+?):([^ ]+?):([^ ]+?):([^ ]+?):([^ ]+?).*
And replace with: $1:$5
and the result I get is
everything works fine up to replace with $1:$4, but with the 5 column does not work something I’m doing wrong, I hope you help me solve it
You were very close. Just change the * for a +. The + is greedy and it will try to grab as many characters as possible up to the end of the line.
Suggest read the FAQ, it has some good links. Also rexegg.com has a table outlining the meaning on the * and +.