Tag Archives: Extract variable length

Extracting a variable length amount from a file line

There might be a situation where we would need to read a file and extract a variable length amount from a line. So, consider an example string/file line- “abcdef1122,52pqr”. Here the amount which we need to extract is “1122,52”. Refer the below code snippet- Here, First, we find the position of “,” and store it… Read More »