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

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

session variables not working anymore
hello,
i use sessions to handle authentication within my site. my host has been changing a lot of

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacing

At pres

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

Delete Client 066 Earlywatch
Hi all,

in former times client earlywatch was required for SAPs remote access to SAP inst

WM transfer order: confirm different batch than proposed by system
Hi folks,

following scenario: we have a full WM with mixed batch numbers allowed in stora

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

comparing tables across databases sql refinement ideas required
Hi all

Via pl/sql I need to ensure that data between tables in different databases match

Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb

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