NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Perl match for brackets []

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 04-28-2008, 10:15 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Apr 2008
Posts: 13
trampy is an unknown quantity at this point
 



Perl match for brackets []


Is there a way to search for a [ in Perl using character codes or other methds? I have tried a \[ escape but that does not work. for example

$string = =~ s/[//;

Will not work because perl sees the [ and thinks it is an unclosed statement.
__________________
webkinz recipes
recipe for cake recipes, chicken recipes, cookie recipes, bread recipes, kids recipes, food
free guitar tabs, lessons
wii-bundle
trampy is offline  
Old 05-03-2008, 10:13 PM   #2 (permalink)
NamePros Regular
Join Date: Dec 2007
Posts: 401
bryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to allbryan1884 is a name known to all
 



you need to place your backslash before the special character. Are you saying you have tried this? If not i believe this is what it should look like.

$string =~ /\[/;
bryan1884 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:27 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger