Google Answers Logo
View Question
 
Q: Why preg_split works only if the char # before the delimiter is 21 or less? ( No Answer,   0 Comments )
Question  
Subject: Why preg_split works only if the char # before the delimiter is 21 or less?
Category: Computers > Programming
Asked by: todddickerson-ga
List Price: $2.00
Posted: 29 Oct 2006 21:07 PST
Expires: 28 Nov 2006 21:07 PST
Question ID: 778331
Why preg_split works only if the char # before the delimiter is 21 or less?
example php code:
=============
$right = "{Hello Im very aaaaaa {cool|not cool}}";
print $right."<br>";
$pattern = '/({(?:[^{}]+(?:"[^"]*"|\'[^\']*\')?)+})/';
$snip_array = preg_split($pattern, $right, -1, PREG_SPLIT_DELIM_CAPTURE);
print_r($snip_array);
============
If I change $right = "{Hello Im very aaaaa {cool|not cool}}"; the
above code works correctly.  Is there a solution to this?
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy