Hi. I'm trying to process a string like below;
Tue 6 2003,
Wed 7 2003,
Thur 8 2003,
Fri 9 2003,
Sat 10 2003
I'm using this line of regex;
$calander =~ s/((\d\d)?|(\d)?)/<a href="$1">$1<\/a>/g;
Is there a way to modify this so it ONLY does the 1/2 digit numbers? i.e so it looks like; (i.e without the year being slip in 2, and changed to a link)
Tue http://6th 2003,
Wed http://7th 2003,
Thur http://8th 2003,
Fri http://9th 2003,
Sat http://10th 2003
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
Mon 5 2003, Tue 6 2003,
Wed 7 2003,
Thur 8 2003,
Fri 9 2003,
Sat 10 2003
I'm using this line of regex;
$calander =~ s/((\d\d)?|(\d)?)/<a href="$1">$1<\/a>/g;
Is there a way to modify this so it ONLY does the 1/2 digit numbers? i.e so it looks like; (i.e without the year being slip in 2, and changed to a link)
Quote:
Mon http://5th 2003, Tue http://6th 2003,
Wed http://7th 2003,
Thur http://8th 2003,
Fri http://9th 2003,
Sat http://10th 2003
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!