I have a windows formatted text file (\r\n) that I am reading into a switch script.
Here is an example of the format:
Code: Select all
=======Section A=======
Value 1: I need this value
Value 2: I need this value
Value 3: I need this value
=======Section B=======
Value 4:
I need
all of
these values
Value 5: And this one too!
I've tried converting the \r\n to \n as well as explicitly saying /Value 1\: (.+)\r\n/ or /Value 1\: (.+)$/ but it just isn't playing ball.
Does anyone have any idea how to get around this?
I am using var jobTicket = File.read(job.getPath() to get my text file into Switch, if that makes any difference.