...

...
Last edited on
...
Last edited on
When you copied thisfile.txt to Linux, did you convert the \r\n of Windows into \n of Linux?

Try running in the debugger, or add some debug prints
1
2
3
        while(farm_file.is_open() && output_file.is_open() && std::getline(farm_file, line))
        {
            std::cout << "DEBUG: line==" << line << "==" << std::endl;


Does the line you see make sense with the regex patterns you're using?
No, I did not convert the \r\n to \n. I didn't even think of that. How can I change that?

When I did the debug statement, the line did print out. However the regex did not match it for some reason. I was able to rewrite the code in a new document and it worked. I'm not exactly sure why the original file did not work.
There's a tag line somewhere that goes

I have a problem.
I know, I'll use regular expressions to solve it.
Now you have TWO problems.

> I didn't even think of that. How can I change that?
It's either called tofrodos or dos2unix or something like that.
Topic archived. No new replies allowed.