[advanced search]
22 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 04-28-2008, 10:15 AM   · #1
trampy
New Member
 
Trader Rating: (0)
Join Date: Apr 2008
Posts: 13
NP$: 0.00 (Donate)
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.


Please register or log-in into NamePros to hide ads
__________________
webkinz recipes
recipe for cake recipes, chicken recipes, cookie recipes, bread recipes, kids recipes, food
free guitar tabs, lessons
wii-bundle
trampy is offline   Reply With Quote
Old 05-03-2008, 10:13 PM   · #2
bryan1884
NamePros Regular
 
Name: Bryan Shields
Location: shieldsdomains.com
Trader Rating: (36)
Join Date: Dec 2007
Posts: 216
NP$: 0.00 (Donate)
bryan1884 is on a distinguished roadbryan1884 is on a distinguished roadbryan1884 is on a distinguished roadbryan1884 is on a distinguished road
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   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Custom Logo Design Buy Flash Arcade Game Script Build your NameBrand
Advertise your business at NamePros
All times are GMT -7. The time now is 04:50 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0