in reply to Re^2: Searching Formatting and Highlighting Text Problem
in thread Searching Formatting and Highlighting Text Problem
Can't you just do the lowercasing before you apply the ranges (using the uppercase approach you outlined)? The tag positions in %startfinish would still be valid, as the case has no influence on length...
my %startfinish = $widget->tagRanges('sel'); # undo uppercase my $s = $widget->Contents(); $s =~ tr/A-Z/a-z/; $widget->Contents($s); foreach(sort keys %startfinish) { $widget->tagAdd("foundtag", $_, $startfinish{$_}); }
That would at least highlight all (lowercased) subsequences. But I'm still not entirely sure what the ultimate objective is... Is it just the highlighting?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Searching Formatting and Highlighting Text Problem
by janusmccarthy (Novice) on Apr 26, 2009 at 13:08 UTC |