-#--- 正規表現のCHISE的拡張 ------------------------------------#
-
-sub ChiseLikeRegex ($) {
- my ($RegexLiteral) = @_;
- #print STDERR "BEFORE: $RegexLiteral\n"; # for debug
- $RegexLiteral =~ s/\\same_strokes_(\d)/(??{CHISE->same_strokes(\$$1)})/g;
- #$RegexLiteral =~ s/\\same_strokes_(\d)/[川山三]/g;
- #print STDERR "AFTER: $RegexLiteral\n"; # for debug
- return $RegexLiteral;
-}
-
-sub same_strokes {
- my $self = shift;
- my $backtrace = shift;
- my $db = "$DB_HOME/system-char-id/total-strokes";
- my $temp = &getvalue($db, "?$backtrace");
- my $result = '';
- for my $i (&getkeys($db, $temp)) {
- $i =~ s/^\?//;
- $result .= $i;
- }
- #print STDERR $result, "\n";
- return "[$result]";
-}
-