Microsoft
Software
Hardware
Network
Question : perl, strip spaces and double quote character at beginning and at the end of a string
How do I strip spaces and double quote character at beginning and at the end of a string, if the double quote exist?
$string1 = "\"my string1\""; # => to "my string1"
$string2 = " \" my string2 \" "; #=> to " mystring2 "
Answer : perl, strip spaces and double quote character at beginning and at the end of a string
Please try this:
s/(^\s*")|("\s*$)//g;
Random Solutions
Resize a live OS partition whilst running! - Windows 2008
Network Installation/Setup
Cannot Access Drive
Documentation on SAMBA and Active Directory Integration
Invalid length passed to SUBSTRING Function
websites background colors
VMWare Lab Manager 4.0 and deployed VMs
Sending a web API command from Asterisk
VBA for Excel - Calling a function from a dll - hanging - suggestions?
Cisco CME - One DID to display its own number in caller ID