in reply to Re^3: Regex with condition
in thread Regex with condition
Dear AnomalousMonk, one thing is for sure, you are obviously the most helpful Monk in this forum with a great heart and a lot of patience with someone like me, who makes one mistake after the other. I have studied your replies, but I had difficulties in understanding the real meaning of $pre and also the $post, partly because this new form of writing a regex is new for me, in the book I have read about regex, this form with the modifier x (which is clearly more readable then the old form) was not used. Also the use of { instead of / was at first glance a little confusing for me. As you wisely have stated, I should have tried harder to learn fishing and not only to consume a fish. In my OP I have abreviated my data so to make my question short, not understanding that this changed the problem.
Concerning the space in the $pre, I have just overlooked the space betweeen FEN and the ". Concerning the $post, in my real data there is leading whitespace before the 'Weiss' line, but in the testfile I have deleted it, for the same reason as before, I wanted to be short.
After so many mistakes which I have made I have studied your solution more thoroughly and now I think I have understood it. At last, I have learned a little bit to fish. But when you are 72 years old, it's not so easy and I must confess that I have only studied in books the parts, which I think were needed to solve my problems.
Once again, many thanks for your great help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Regex with condition
by AnomalousMonk (Archbishop) on Nov 20, 2015 at 17:03 UTC |