Hi,
thanks again. The following patch adds capability of searching with regexes (I get some utf8 errors, but it works. Do you happen to know how to fix them?):
18c18 < my ($recurse, $name, $case,$linenums,$quick_start) =(0,0,0,0,0); --- > my ($recurse, $name, $case,$linenums,$quick_start, $use_regex) =(0,0 +,0,0,0); 21a22 > if( grep{/\bR\b/} @ARGV ){@ARGV = grep { $_ ne 'R' } @ARGV; $use_reg +ex = 1 }; 64a66 > my $vboxC3 = Gtk2::VBox->new(); 83a86,91 > my $checkbutton5 = Gtk2::CheckButton->new('Use RegEx'); > $checkbutton5->signal_connect( clicked => > sub{check_button_callback($checkbutton5, \$use_regex , +'use_regex')}); > $vboxC2->pack_start( $checkbutton5, 0, 0, 0 ); > > if($case){$checkbutton5->set_active(1);} 87c95 < $vboxC2->pack_start( $checkbutton4, 0, 0, 0 ); --- > $vboxC3->pack_start( $checkbutton4, 0, 0, 0 ); 91a100 > $hboxt->pack_start( $vboxC3, 0, 0, 0 ); 284,285c293,307 < if ($case){$regex = qr/\Q$search_str\E/} < else{$regex = qr/\Q$search_str\E/i} --- > if ($case){ > if ($use_regex) { > $regex = qr/$search_str/; > } > else { > $regex = qr/\Q$search_str\E/} > } > else { > if ($use_regex) { > $regex = qr/$search_str/i; > } > else { > $regex = qr/\Q$search_str\E/i; > } > }

Regards,
svenXY

In reply to Re^3: Gtk2 Visual Grep by svenXY
in thread Gtk2 Visual Grep by zentara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.