String Find Rev

Discuss suspected defects before submitting a bug report

Moderator: electrogear

String Find Rev

Postby Mo on Wed Jul 18, 2012 2:50 am

Hi,

String Find seems not to work in some situations when reverse find is set to true. Here the word "example" is not found while the word "working" is found:

stringFindNotWorking.png
stringFindNotWorking.png (15.6 KiB) Viewed 1695 times
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: String Find Rev

Postby trogluddite on Wed Jul 18, 2012 5:03 am

Bug confirmed.
After trying lots of search strings, it is very hard to predict what will or won't work - the only rule I could discern is that adjacent identical letters seem to trip it up every time, but there are plenty of other non-working combinations.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3024
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: String Find Rev

Postby Mo on Wed Jul 18, 2012 5:27 am

Thank you, well then I will report the bug ..
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: String Find Rev

Postby Mo on Wed Jul 18, 2012 12:10 pm

It was when the search string has two identical letters and it will be sorted.

Trog, you could find other non-working combinations?
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: String Find Rev

Postby trogluddite on Wed Jul 18, 2012 4:50 pm

Had another play, and I think I've sussed it
I was part way there with the 'double letters' I mentioned before. It seems to go wrong whenever the first character of the search string happens again anywhere else in the string.
Hence 'example' does not work (repeated 'e') but 'working' does ('w' is not repeated). Other characters in the string can be repeated safely, just not the first one. Couldn't find any other problem strings.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3024
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: String Find Rev

Postby philter5 on Wed Jul 18, 2012 5:31 pm

good to know. hx trog and mo :)
---Yes, a piece of software CAN be your best friend---
User avatar
philter5
smaniac
 
Posts: 1478
Joined: Thu Jan 04, 2007 7:52 pm
Location: Germany


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest