By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,116 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,116 IT Pros & Developers. It's quick & easy.

how preg_match any character except quote?

P: n/a
Hi all, please correct me if I'm completely off topic here... ;)

I'd like to match any character except ". Been thinking about making a class [.!\"], but it does not work. It
seems that dot [.] does not work in class. Is there a way to match any character in a class except some
few characters? I know that making a class for all characters sounds alogical (that's maybe the reason
why dot does not work), but I don't get any better solution.

Thank you for help,
Y.

--
sorry for any ads below :(

Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
Jun 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Yandos <fa******@fakeisp.com> wrote:
I'd like to match any character except ".


You can use negation (^) in a character class.

[^"] matches any character except "

--
Jari
Jun 23 '06 #2

P: n/a
"Jari Jokinen" <ja**********@iki.fi> wrote in news:Jn*****************@reader1.news.jippii.net:
Yandos <fa******@fakeisp.com> wrote:
I'd like to match any character except ".


You can use negation (^) in a character class.

[^"] matches any character except "


Thank you, it works :)

Y.
--
sorry for any ads below :(

Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
Jun 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.