Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Simple regex

by Dietz (Curate)
on Jan 19, 2005 at 12:55 UTC ( #423357=note: print w/replies, xml ) Need Help??

in reply to Simple regex

Maybe this is what you're looking for:
$text =~ s/(.+\s)\S*\.\S*/$1/g;

0000 636d6400 5589e583 ec0831c0 83e4f0e8 0010 00000000 e8000000 0083ec0c 68000000 0020 00e80000 000031c0 c9c39090 90909090

Replies are listed 'Best First'.
Re^2: Simple regex
by Isothop (Novice) on Jan 19, 2005 at 13:42 UTC
    thanks for your help but the problem is still there.
    this is my source code :
    #!perl -w # use strict; # # Hashes my %struct_compilation = ( "objdump" => "%s -j .text -s -z %s", ); my %compilation = ( "objdump" => "", ); my %return = ( "objdump" => "", ); my $path = "D:/Progs/Programmation/Dev-Cpp/bin/"; my %compiler = ( "objdump" => $path . "objdump.exe", ); # # Main if( @ARGV < 1 ) { exit( 0 ); } my $src = $ARGV[0]; $compilation{"objdump"} = sprintf( $struct_compilation{"objdump"}, $co +mpiler{"objdump"}, $src ); $return{"objdump"} = `$compilation{"objdump"}`; $return{"objdump"} =~ s/[0-9a-f]{4}//g ; print $return{"objdump"};
    i want to print the hexa decimal string whitch is returned by objdump but my regex do the contrary !
      $return{"objdump"} =~ s/[0-9a-f]{4}//g;
      $return{"objdump"} = join("",$return{"objdump"} =~ /[0-9a-f]{4}/g)
        thanks to you ! it works :)

      For those of us not blessed with windows and objdump can you post a frag of the objdump output so we can see what to aim for.


      Pereant, qui ante nos nostra dixerunt!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://423357]
[chacham]: right now im editing the versions in the applications gradle file to use a version it wants. sheesh.
[Corion]: Ow, "but you're not supposed to do that" ;)
[chacham]: with google, you kinda just gotta do what it recomends.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-03-29 08:06 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (344 votes). Check out past polls.