Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Regex Question
summergs
Hello,
Can someone help me with the syntax to return the following line withOUT the server??
From:
$area_path = "//SEVERDEV/default/main/federal/internet/state/Projects/R1D534/WORKAREA/workarea";
To:
$area_path = "/default/main/federal/internet/state/Projects/R1D534/WORKAREA/workarea";
Thanks in Advance!
Find more posts tagged with
Comments
Dwayne
$area_path =~ s|//[^/]+||;
--
Current project: TS 5.5.2/6.1 W2K
summergs
****...I had $area_path =~ s|//[^/]+|;
Many Thanks!
Dwayne
Actually, to be more accurate, I really
should
have written
$area_path =~ s|^//[^/]+||;
to make sure it started the match at the beginning of the string, but it's not likely to be much of a problem in this case. Since this is (presumably) coming from TeamSite, rather than user input, it's not likely that you'll have to deal with "weird" input strings.
--
Current project: TS 5.5.2/6.1 W2K