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:

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

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i

Need help with cin setw
I made a program here is my code:

#include
#include
#i

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

ORA-01017: invalid username/password; logon denied
Dear All,

I am facing problem in taken backup from db13 it comes up with the following l

Empty text file when there is over XXXX lines of text.

define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "

Redirecting Admin
In my members table, I have a field called "perm" and it's set to zero for all members. Ho

values in array being escaped
I would like to submit some values - back to the same form for checking before processing...

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