I have an ANT script which will have a property whose value could be one or more lines e.g.
property
prop1=
A_12.1_REL_B121000_10_18_2011.1700
A_12.1_REL_B121001_10_25_2011.6059
A_12.1_REL_B121001_10_25_2011.2201
A_12.1_REL_B121001_10_25_2011.2014
Please see that all these lines end with a CRLF and end of file is also another CRLF. Now what I need to do is just select the last line using a regex. The number of lines could be less or more e.g
prop1=
A_12.1_REL_B121000_10_18_2011.1700
In the second case I need to select this single line .
I have searched older posts, but could not find anything specific. Any pointers ?
If you are using ant-contrib :
This will always print the last line of your input properties file :