Hi, i search a better block to achieve this (not this ugly block)
I think i can use the split block to achieve the task but i can't figure out...
Hi, i search a better block to achieve this (not this ugly block)
I think i can use the split block to achieve the task but i can't figure out...
first of all, no need do specify case sensitivity, thats a setting.
If it is important for you :yes
Yeah, it's really hard to deal with overlapping partial matches, such as searching for "sis" in "Mississippi." I think you may be asking for too much from SPLIT. In your example, it seems to me that the right answer is not (1,5) but rather (1,2,5,6).
I mean, it just seemed unessecary, but I am right now working on a cleaner version of the block.
basically i need to search for the occurrence of a single character like the 1st example
(another example: where's the a in alabama: 1,3,5,7)
the 1st blank is an "a": so it is at position 1 (length of "a" is 1)
there is an "a" between "l" and "b" so 1+lenght of "l" +1(the next char) =3
there is an "a" between "b" and "m" so 3+lenght of "b" +1(the next char) =5
and so on...
I agree, SPLIT is perfect for single characters -- although it doesn't tell you the actual position indices, so you have to do that calculation. It's just multiple characters that makes it hard, because of the overlap cases.
I don't know, it's a matter of point of view.
The question is: when I found a substring, do I continue the search at the next character or after the previously found substring...
in microsoft word:
Well obviously whatever Microsoft Word does has to be wrong! ;~P
Yes.
Impressive speed !
idk why, your's is very slow in a big string; maybe because you use recursion with the big string as input over and over (? and it take so much memory?).
try it with:
(ego-lay_atman-bay do it in 150ms)
thank you! after compiling the map blocks (See my old post, I edited it) its now even faster!
That's correct, because the string you're searching is ..a...
with 2 dots at the beginning instead of 3. However, I did notice that it is indeed wrong when searching for ...