Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Clipboard transform keys

by phildog (Novice)
on Aug 14, 2003 at 16:55 UTC ( #283934=note: print w/replies, xml ) Need Help??


in reply to Clipboard transform keys

Nice! Can you post the href transform code in this thread as well?

Replies are listed 'Best First'.
Re^2: Clipboard transform keys
by PhilHibbs (Hermit) on Aug 18, 2003 at 10:15 UTC
    Here's the script that transforms an URI into a HTML link:
    @rem = '--*-Perl-*-- @echo off perl -x -S "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; #!perl #line 8 use strict; use warnings; use HTML::Entities; use Win32::Clipboard; my $CLIP = Win32::Clipboard(); my $text = $CLIP->GetText; if (substr($text,0,1) ne '<') { chomp $text; $text = encode_entities($text); $CLIP->Set('<a href="'.$text.'"></a>'); } __END__ :endofperl
    Update:Uses HTML::Entities to translate & to &amp; etc.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://283934]
help
Chatterbox?
Eily takes a peek in the last hour of CB to discover that LanX woke up is boobs with some Queen :P
[Eily]: s/\K\bis\b/h/
[Tux]: you left the space in
[Tux]: and that \K is not required
[Tanktalus]: 11.31 is already 10 years old... you still need to support versions older than that? My condolences :)
[Eily]: meh, got confused. s/(?=\bis\b)/h/ will work better :)
[Eily]: \K keeps the thing on the left, not the right (IE, it's like look behind, not look ahead)
[Tux]: and 11.31 is still the last stable. We're moving all our customers to Linux (openSUSE and CentOS), but that takes a loooooooooooooooon g time
[LanX]: ehm ... I woke up my *boobs* ?
LanX where is the camera?

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-09-20 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (237 votes). Check out past polls.

    Notices?