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

Checking the matching of white-space characters after a line break #320

Open
elfring opened this issue Oct 12, 2021 · 2 comments
Open

Checking the matching of white-space characters after a line break #320

elfring opened this issue Oct 12, 2021 · 2 comments

Comments

@elfring
Copy link

elfring commented Oct 12, 2021

I tried another search pattern out.

[Markus_Elfring@fedora lokal]$ printf 'else:\n  X\n' | ./comby -stdin -diff -matcher .py 'else::[_\n]:[ ]X' Z

💭 May I expect that such a command should generate a simple transformation result?

@elfring
Copy link
Author

elfring commented Oct 12, 2021

Do you find another search approach reasonable for such an use case?

[Markus_Elfring@fedora lokal]$ printf 'else:\n  X\n' | ./comby -stdin -stdout -matcher .py 'else::[_\n]:[~\s+]X' Success
Success

@elfring
Copy link
Author

elfring commented Oct 13, 2021

Will the following test result trigger also any further software development considerations? 🤔

[Markus_Elfring@fedora lokal]$ printf '    if active:\n  X\n' | ./comby -stdin -stdout -matcher .py ':[ indentation]:[check~if active]::[_\n]:[ ]X' Surprise
    if active:
  X

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