Guerrilla 19 Posted December 24, 2010 Report Share Posted December 24, 2010 When checking a list for a value the "contains" qualifyer is case sensitive. Is there a way to use this in a way so it is non-case sensitive? Quote Link to post Share on other sites
HarryPotter 9 Posted December 25, 2010 Report Share Posted December 25, 2010 cool! had the exact same question Quote Link to post Share on other sites
Guerrilla 19 Posted January 8, 2011 Author Report Share Posted January 8, 2011 Bump! Also $replace appears to be case sensitive. This has become a major pain in the arse as I am having to use javascript for everything which kind of defeats the purpose of using ubot. Quote Link to post Share on other sites
JohnB 255 Posted January 8, 2011 Report Share Posted January 8, 2011 Well there are a couple of ways. $contains--->either or regex. I must say though I am kind of perplexed at the statement that having to use javascript all the time defeats the purpose of using UBot. That's kind of like saying my car runs on gas OR water, but if I have to keep using water I may as well swim there. I'm pretty certain that if you removed everything UBot from all of your javascript code you would be left with nothing functional. Quote Link to post Share on other sites
Abs* 12 Posted January 8, 2011 Report Share Posted January 8, 2011 HI John - great info - I didnt think of the either command for letters - I have a bot which searches some text for #var1 - this is set by a user and will always change - if #var1 is found then it will change it to a anchor text using a url from a list say if a user was to type in SEO services or SEO Services or Seo services or Seo Services etc..... How could i do it then - The idea is to link to that keyword regardless of using upper or lower case - thanks Quote Link to post Share on other sites
Guerrilla 19 Posted January 8, 2011 Author Report Share Posted January 8, 2011 Well there are a couple of ways. $contains--->either or regex. I must say though I am kind of perplexed at the statement that having to use javascript all the time defeats the purpose of using UBot. That's kind of like saying my car runs on gas OR water, but if I have to keep using water I may as well swim there. I'm pretty certain that if you removed everything UBot from all of your javascript code you would be left with nothing functional. My point was ubot has several features that should make life easy but there is simple problems with them that mean I have to write my own javascript functions instead of using them. I don't agree with your water/car/swimming anology but I didn't come here to argue. Sorry I even asked... Quote Link to post Share on other sites
JohnB 255 Posted January 9, 2011 Report Share Posted January 9, 2011 HI John - great info - I didnt think of the either command for letters - I have a bot which searches some text for #var1 - this is set by a user and will always change - if #var1 is found then it will change it to a anchor text using a url from a list say if a user was to type in SEO services or SEO Services or Seo services or Seo Services etc..... How could i do it then - The idea is to link to that keyword regardless of using upper or lower case - thanks Yeah, I see where that could cause problems. The pro version has the proper text constant which capitalizes the first letter of every word, but that still falls a little short as far as your example is concerned. I think if you take into consideration the potential for an anchor text phrase, I would have to believe that words like SEO would be among the minority. Most anchor text phrases are likely to be in the proper text format. However, it only takes one example (like SEO) to render the bot less than fully functional which obviously is NOT a desired outcome. In order to use regex, you would have to code the bot to set regex strings dynamically, and while not impossible, that would be a LONG way to go to solve that one issue. While I was writing this I was testing something...check it out text_case.ubot That is VERY interesting. enter the search term seo services (all lowercase)...it works for this example...if you remove the set command it does not. Quote Link to post Share on other sites
JohnB 255 Posted January 9, 2011 Report Share Posted January 9, 2011 My point was ubot has several features that should make life easy but there is simple problems with them that mean I have to write my own javascript functions instead of using them. I don't agree with your water/car/swimming anology but I didn't come here to argue. Sorry I even asked... It's great that you asked! And I would never disagree that there some limitations. And this opened up a discussion conducive to solving some issues. But, the fact you are ABLE to integrate javascript into your UBot coding is a huge benefit. Unfortunately Seth can't implement every upgrade or feature request, or he would do just that. So we work with what we have and help each other work through whatever stumbling blocks we may come across. Whatever you don't stop posting...thay's what this forum is for. Quote Link to post Share on other sites
Guerrilla 19 Posted January 9, 2011 Author Report Share Posted January 9, 2011 That is VERY interesting. enter the search term seo services (all lowercase)...it works for this example...if you remove the set command it does not. I entered in lower case but it didn't work (i.e. no alert). Weird thing is if I leave the box blank it evalutes as true and sends me to google and creates the alert box. I have a bot which searches some text for #var1 - this is set by a user and will always change - if #var1 is found then it will change it to a anchor text using a url from a list say if a user was to type in SEO servicesorSEO ServicesorSeo servicesorSeo Services etc..... How could i do it then - The idea is to link to that keyword regardless of using upper or lower case - Not sure I followed exactly what you are trying to achieve but this bot might do the trick.replace (noncase sensitive).ubot Quote Link to post Share on other sites
JohnB 255 Posted January 9, 2011 Report Share Posted January 9, 2011 I am guessing it returned true because it was able to find nothing (blank space) on the page. But what I found interesting is that when you change the lowercase to all uppercase it worked even though it was not a match by case. Quote Link to post Share on other sites
Guerrilla 19 Posted January 9, 2011 Author Report Share Posted January 9, 2011 I am guessing it returned true because it was able to find nothing (blank space) on the page. But what I found interesting is that when you change the lowercase to all uppercase it worked even though it was not a match by case. I can't re-create that effect. Is that because I only have standard version? Quote Link to post Share on other sites
JohnB 255 Posted January 9, 2011 Report Share Posted January 9, 2011 That shouldn't matter...can you see the set node? (with $text to upper case)? Quote Link to post Share on other sites
Abs* 12 Posted January 9, 2011 Report Share Posted January 9, 2011 hi john - yeh that didnt seem to work for me but thanks for posting back Guerrilla - im not sure i entirely understand your code - still a newbie anyway what i saw was that it was replacing the the word TEXT all upper case and you searched for it using lower case then replaced it with words - its great that is recognized the word - TEXT regardless of the the case however is there anyway we can implement this in the following code - image attached The #AnchorKeyword is a UI box which is the part we are checking for which requires the case sensative code we are trying to work out thanks abs Quote Link to post Share on other sites
Guerrilla 19 Posted January 9, 2011 Author Report Share Posted January 9, 2011 That shouldn't matter...can you see the set node? (with $text to upper case)? Yes, I can see the node. Abs - ok, I will have a play with my code so you can use it to add link and anchor text Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.