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

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

simple php table loop
Hi all,

I've the following code

<?php // Create category options

turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so f

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