regex for quoted text within a string


Posted on 16th Feb 2014 07:03 pm by admin

I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape quoted text within a string. The qualitifcations for escaping them would be to have [a space] [a double quote] [any text] [a double quote] [a space] but there cant be anything besides a space before and after, not even a newline.

here's what i have so far:

Did you know?Explore Trending and Topic pages for more stories like this.
Code: $pattern = '/ "." /';
$replacement = '/ "." /';
$val = preg_replace($pattern, $replacement, $val);
But it's not working. I've always wanted to learn how to use regular expressions and like I said I am new to them.
No comments posted yet

Your Answer:

Login to answer
72 Like 32 Dislike
Previous forums Next forums
Other forums

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Writting a script to arrange images........ need some help
Ok so here is the link

http://hmtotc.com/dev/projects/vrassociates/jeweler_dev/admin/index.ph

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

How to have a log of all the status a VIM document had been ?
Hi guys,

I’m using SAP Invoice Management plugin and the /OPT/VIM_ANALYTICS transa

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash