[OFF TOPIC] - Help with Regular Expressions on PHP.

Hello, im having a trouble on Regular Expressions (on PHP) My code:

TV LCD 32” H-Buster HBTV-3203HD
**I want to take:**
**TV LCD 32” H-Buster HBTV-3203HD**
**Is my RE going to be like that?**: __preg_match_all('/nomeProduto\"\>([a-zA-Z_\.0-9\/\-\!\t\n\"\'\” :\@\$]*)\</i', $www, $name);__ I think this whill catch like this (but that doesn't work ether): **I want to take:**
** **TV LCD 32” H-Buster HBTV-3203HD <**/div>

Can some one help me with this RE on PHP?

If you have to put OFF-TOPIC in the topic of a topical mailing list, should that be a warning that you’re sending to the wrong list?

Jason

Edison, I would recommend comp.lang.php

Good luck,

-Conrad

No, this is because is not related direct with RoR. But since most of RoR programmers came from PHP, they might give me some usefil help with this Regular Expression…

comp.lang.php???

/sigh

http://lmgtfy.com/?q=comp.lang.php

Hello, im having a trouble on Regular Expressions (on PHP)

James Byrne wrote:

Hello, im having a trouble on Regular Expressions (on PHP)

,

Can some one help me with this RE on PHP?

Regexp are regexp. It really should not matter how or from what language they are called, unless the implementation varies.

The implementation does vary. Every regexp parser implements a slightly different syntax, or so it seems.

If you are having problem with constructing a working regexp then you might find this site worth visiting:

http://www.rubular.com/

Yes, *if* you're working with something sufficiently close to Ruby regexps.

Good luck.

Best,

Don't. Just don't. Parsing HTML with regexps is a bad idea - get a real parser, and use it correctly. If you *insist* on doing it with regexps, see this link:

http://kevin.deldycke.com/2007/03/ultimate-regular-expression-for-html-tag-parsing-with-php/

That may help.

--Matt Jones

Ok, thanks! I really what some help on this… I’m totally lost.

If some one give me the RE of this, i can use to study. (i cant make the “tabs/enters” to work)

Well, i did like this (it’s not good, I know) nomeProduto">\n.*\t([a-zA-Z=&?.0-9/-!\” :@$])\n.<_

(don’t work so good) Some one have a better idea to help me?

\n.\t(.)\n.*

its slow, but i’m getting there! :smiley: