Receiving data from a form that contains a comma

Posted on 2000-01-06
Medium Priority
Last Modified: 2010-03-05
Is there a way to receive data with a comma and have it remain a comma.

Here is the data that was inputed:
pink, bunny

and here's the data that was printed after going through a parsing form:
pink%2C bunny

Is there any type of code that I can use to fix this problem?
Question by:kch011099
1 Comment

Accepted Solution

mjswart earned 200 total points
ID: 2330162

$value = "pink %2C bunny";
$value =~ s/%2C/,/;

It might be better to handle all cases look though like this:

while (/\%(..)/)
    $char = chr(hex($1));

or something like it.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question