Hello, im having a trouble on Regular Expressions (on PHP) * My code:* <div style="padding-top: 3px;"> <div class="nomeProduto"> TV LCD 32” H-Buster HBTV-3203HD </div> </div> *I want to take:* <div style="padding-top: 3px;"> <div class="nomeProduto"> *TV LCD 32” H-Buster HBTV-3203HD* </div> </div> *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:* <div style="padding-top: 3px;"> <div class="*nomeProduto"> **TV LCD 32” H-Buster HBTV-3203HD <*/div> </div> Can some one help me with this RE on PHP? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jason Roelofs
2010-Jan-14 19:43 UTC
Re: [OFF TOPIC] - Help with Regular Expressions 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Jan-14 20:05 UTC
Re: [OFF TOPIC] - Help with Regular Expressions on PHP.
Edison, I would recommend comp.lang.php Good luck, -Conrad On Thu, Jan 14, 2010 at 11:30 AM, Edson Lopes <edsonlb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, im having a trouble on Regular Expressions (on PHP) > * > My code:* > > <div style="padding-top: 3px;"> > <div class="nomeProduto"> > TV LCD 32” H-Buster HBTV-3203HD > </div> > </div> > > *I want to take:* > > <div style="padding-top: 3px;"> > <div class="nomeProduto"> > *TV LCD 32” H-Buster HBTV-3203HD* > </div> > </div> > > *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:* > > <div style="padding-top: 3px;"> > <div class="*nomeProduto"> > **TV LCD 32” H-Buster HBTV-3203HD > <*/div> > </div> > > Can some one help me with this RE on PHP? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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... On Thu, Jan 14, 2010 at 5:43 PM, Jason Roelofs <jameskilton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> 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 > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
comp.lang.php??? On Thu, Jan 14, 2010 at 6:05 PM, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Edison, I would recommend comp.lang.php > > Good luck, > > -Conrad >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jason Roelofs
2010-Jan-15 13:49 UTC
Re: [OFF TOPIC] - Help with Regular Expressions on PHP.
/sigh http://lmgtfy.com/?q=comp.lang.php On Fri, Jan 15, 2010 at 6:53 AM, Edson Lopes <edsonlb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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... > > > > > On Thu, Jan 14, 2010 at 5:43 PM, Jason Roelofs <jameskilton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> 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 >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 14, 2:30 pm, Edson Lopes <edso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. If you are having problem with constructing a working regexp then you might find this site worth visiting: http://www.rubular.com/ Good luck. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
James Byrne wrote:> On Jan 14, 2:30 pm, Edson Lopes <edso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --00032555412a78ab16047d34acb5 Content-Type: text/plain; charset=ISO-8859-1 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --00032555412a78ab16047d34acb5--
On Jan 14, 2:30 pm, Edson Lopes <edso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > *Is my RE going to be like that?*: > *preg_match_all(''/nomeProduto\"\>([a-zA-Z_\.0-9\/\-\!\t\n\"\''\” > :\@\$]*)\</i'', $www, $name);* >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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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) On Fri, Jan 15, 2010 at 12:19 PM, Matt Jones <al2o3cr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Jan 14, 2:30 pm, Edson Lopes <edso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > *Is my RE going to be like that?*: > > *preg_match_all(''/nomeProduto\"\>([a-zA-Z_\.0-9\/\-\!\t\n\"\''\” > > :\@\$]*)\</i'', $www, $name);* > > > > 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. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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? On Mon, Jan 18, 2010 at 11:02 AM, Edson Lopes <edsonlb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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) > > > > On Fri, Jan 15, 2010 at 12:19 PM, Matt Jones <al2o3cr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> >> >> On Jan 14, 2:30 pm, Edson Lopes <edso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > *Is my RE going to be like that?*: >> > *preg_match_all(''/nomeProduto\"\>([a-zA-Z_\.0-9\/\-\!\t\n\"\''\” >> > :\@\$]*)\</i'', $www, $name);* >> > >> >> 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. >> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
*<div class="nomeProduto">\n.*\t(.*)\n.*</div>* its slow, but i''m getting there! :-D -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.