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

Search/Replace acts like it's always adding implicit + #12

Open
zb-z opened this issue Sep 23, 2019 · 0 comments
Open

Search/Replace acts like it's always adding implicit + #12

zb-z opened this issue Sep 23, 2019 · 0 comments

Comments

@zb-z
Copy link

zb-z commented Sep 23, 2019

Probably the consequence of doing interactive highlighting and probably not visible till you have consecutive repeating strings. Turning on RegExp didn't help.

Additional problem - "Replace All" misses a number of matches. Don't have the time to chase "hows" and "whys" - there's probably some search string rewriting inside.

IdleX version: 1.18
sys.version: '3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]'

Example (it's exhaustive - all combinations of 5 parenthesis. ):

stringsRW = [
'((((()))))',
'()(((())))',
'(()((())))',
'((()(())))',
'(((()())))',
'()((()()))',
'(()(()()))',
'((()()()))',
'()(()(()))',
'(()()(()))',
'()()((()))',
'(())((()))',
'((())(()))',
'(((())()))',
'()((())())',
'(()(())())',
'((()())())',
'()(()()())',
'(()()()())',
'()()(()())',
'(())(()())',
'((())()())',
'()(())(())',
'(()())(())',
'()()()(())',
'(())()(())',
'((()))(())',
'(((()))())',
'()((()))()',
'(()(()))()',
'((()()))()',
'()(()())()',
'(()()())()',
'()()(())()',
'(())(())()',
'((())())()',
'()(())()()',
'(()())()()',
'()()()()()',
'(())()()()',
'((()))()()',
'(((())))()',

Try: Replace ( with 1
Replace ) with 0

IdleX gives:

stringsRW = [
'10',
'1010',
'1010',
'10((0',
'10(0',
'1010(0',
'101010',
'10(010',
'101010',
'101010',
'101010',
'1010',
'1010',
'10(0',
'101010',
'101010',
'10(010',
'10101010',
'10101010',
'10101010',
'101010',
'101010',
'101010',
'101010',
'10101010',
'101010',
'101))',
'101))',
'10101)',
'10101)',
'10(01)',
'10101010',
'10101010',
'10101010',
'101010',
'101010',
'10101010',
'10101010',
'1010101010',
'10101010',
'101)10',
'101)',

and it should be:

stringsRW = [
'1111100000',
'1011110000',
'1101110000',
'1110110000',
'1111010000',
'1011101000',
'1101101000',
'1110101000',
'1011011000',
'1101011000',
'1010111000',
'1100111000',
'1110011000',
'1111001000',
'1011100100',
'1101100100',
'1110100100',
'1011010100',
'1101010100',
'1010110100',
'1100110100',
'1110010100',
'1011001100',
'1101001100',
'1010101100',
'1100101100',
'1110001100',
'1111000100',
'1011100010',
'1101100010',
'1110100010',
'1011010010',
'1101010010',
'1010110010',
'1100110010',
'1110010010',
'1011001010',
'1101001010',
'1010101010',
'1100101010',
'1110001010',
'1111000010',

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