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
Unexpected result with regard to ^ #8
Comments
But you find another interesting bug, for |
But there is no combination of options, that results in: Match Match This is different from "https://regexr.com/3gqjc". There is the global and the multiline flag set. Doesn't "global" mean "--count 0"? |
@O-D-S works for me in newest version:
If you mean |
You have uploaded more than one version this evening, haven't you? I have downloaded subst.py again and
indeed works now as expected. I will test it tomorrow more extensively. |
In future I will post the checksum of the version, to which I regard. Good night! Edited: I have to check this tomorrow again: -p "^[:blank:]*Test" does not work. |
Yep, uploaded twice, but second one was uploaded before my last comment :) You don't need a checksum, just look at commits :) About PCRE has |
|
For tabs and spaces only you can use: |
Thanks! Unexpected results with |
Test Test
Test Test
Test Test
Test Test
python.exe subst.py -b --count 0 --verbose -p "^Test Test\r\nTest" -r "Match Match\r\nMatch" "Test.txt"
results in
Match Match
Match Test
Test Test
Test Test
python.exe subst.py -b --count 0 -l --verbose -p "^Test Test\r\nTest" -r "Match Match\r\nMatch" "Test.txt"
results in
Test Test
Test Test
Test Test
Test Test
python.exe subst.py -b --count 0 -l --pattern-multiline --verbose -p "^Test Test\r\nTest" -r "Match Match\r\nMatch" "Test.txt"
results in
Test Test
Test Test
Test Test
Test Test
python.exe subst.py -b --count 0 --pattern-multiline --verbose -p "^Test Test\r\nTest" -r "Match Match\r\nMatch" "Test.txt"
results in
Match Match
Match Test
Test Test
Test Test
None of the combinations of options results in
Match Match
Match Test
Match Match
Match Test
I am not sure, if this is intended. (I know, that count 0 is default.)
(I am using the version of subst.py, in which you have used the fnmatch instead of the glob module. For the case, that there is a bug with regard to ^ or one of the options and you fix it, before you fix the wildcard bug, I cannot check, if the bug fix works on Windows and with Python 2.7.11.)
The text was updated successfully, but these errors were encountered: