Hi,
I was wondering if anyone has a nice regex or module which modifies a
string to look good in an url.
You know this behaviour from blogs which make urls from the blog title
Example: Beta Launch Invites: Kwyno Brings The Web Into Your IM And
(Soon) SMS Inboxes -
You might also want to add these two to the end:
=~ s/--+/-/g;
=~ s/-$//g;
Scott McWhirter wrote:
$str =~ s{\W}{}g;
$str = lc($str);
$str =~ s{\s+}{-}g;
--
-Scott McWhirter- | -konobi-
On Mon, Dec 15, 2008 at 12:10, Moritz Onken on...@houseofdesign.de
mailto:on...@houseofdesign.de wrote:
On 15.12.2008, at 21:22, Jim Spath wrote:
You might also want to add these two to the end:
=~ s/--+/-/g;
=~ s/-$//g;
Scott McWhirter wrote:
$str =~ s{\W}{}g;
$str = lc($str);
$str =~ s{\s+}{-}g;
My not very elegant, but working solution:
my $str = Beta Launch Invites: Kwyno Brings The
Hi Everyone,
I'm getting ready to post an updated Tutorial to CPAN. kd and mst asked
that I post a tarball for people to check out so we know I don't mess it up.
:-) Please check out the tarball available here:
http://dev.catalystframework.org/wiki//tutorialdevrelease.view
and let me know if
On Mon, Dec 15, 2008 at 02:14:16PM -0800, J. Shirley wrote:
I've been meaning to, for use with DBIx::Class::Tokenize ... but
better to have something like Text::Filter::URI and then a Template
Toolkit Filter that simply uses that underlying module.
I agree. I initially wrote
On Dec 15, 2008, at 1:23 PM, Moritz Onken wrote:
Am 15.12.2008 um 21:53 schrieb Johannes Plunien:
On 15.12.2008, at 21:22, Jim Spath wrote:
You might also want to add these two to the end:
=~ s/--+/-/g;
=~ s/-$//g;
Scott McWhirter wrote:
$str =~ s{\W}{}g;
$str = lc($str);
$str =~
On Mon, 15 Dec 2008 18:28:03 -0800, Ashley a...@sedition.com wrote:
Just a caveat that should be in the doc you end up with if not
possible in the code. URIs are supposed to be unique to a resource.
Titles of articles and pages are not (necessarily). The end user/dev
will have to check