remove first 4 lines from string

2024-05-14 Thread ITwrx
Thanks a lot to both of you! I figured my `\n` was probably the reason for the non-matching condition, but was not sure what `\n` was supposed to be. I had searched before, but didn't find the info i needed. Spurred by your confirmations, i searched again, and my code now matches the input. It

remove first 4 lines from string

2024-05-14 Thread Zoom
The code works exactly as intended: the prefix isn't getting deleted because it doesn't match. What it means is that perhaps your input is not as deterministic as you think and you need to change the strategy. For example, use `std/pegs` to match only the meaningful content in the start of the s

remove first 4 lines from string

2024-05-13 Thread janAkali
While the text looks the same in both instances, it could have non-printable characters or terminal command chars that you can't normally see. On Linux you can use cli tools like `od` to inspect output in detail, e.g.: $ nim r program.nim | od -a 000 nl C o n t e

remove first 4 lines from string

2024-05-13 Thread ITwrx
I'm trying to use strutils.removePrefix to remove the first 4 lines from a string, but i'm having trouble matching the first four lines. I'm guessing it has something to do with the newlines. How am i supposed to make this match? thanks. #my code varChunk = chunk prefix = "\n"