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

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

help with image text
Hi ...

see i need the text of the name and number to start in the center and always be in the

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

code help - pagination
Hi all, I have this code, basically a user logs into my site and they get this page.

The pro

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

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