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

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

why preg_match_all does not return the number of matches
My regex looks like

X[^x{4e00}-x{9fa5}]*Y

(where X and Y are two Chinese characters)

Sequencing or queuing parallel process
Scenario is as follows
There is one parent process say P1 and 4 child processes say A B C D

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

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