You need to make a RegExp (regular expression) for this. THe RegExp below searches text in an object. When it finds any a character followed by any b character...it finds a match for a function you can then create such as select() for a text object. I am not sure about this but here is my guess: text.select('/([aA][bB])/') i am sure about the RegExp but not sure if i wrote it correctly. im not even sure if i implemented it correctly.
subject: Highlighting a portion of text in a textarea