Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no method matching skip #56

Open
judober opened this issue Jul 13, 2023 · 0 comments
Open

no method matching skip #56

judober opened this issue Jul 13, 2023 · 0 comments

Comments

@judober
Copy link

judober commented Jul 13, 2023

Hello,
I want to search in some text for a keyword and extract the Text beginning with the keyword to the end.

I have the following simplified example:

(path, io) = mktemp();
write(path, "Hello World!") # dummy content
readuntil(io, "World") # serach for keyword
skip(io, -5) # go back to include keyword in result
DesiredOutput = readuntil(io, "\n") # get rest of the file

However, this is not possible when working with an encoding:

io2 = open(path, enc"MS-ANSI") # open with encoding
readuntil(io2 , "World") # serach for keyword
skip(io2 , -5) # go back to include keyword in result <-- errors
DesiredOutput = readuntil(io2 , "\n") # get rest of the file

Should skip be supproted or is there a better solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant