FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Help with regex
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Help with regex [message #184955 is a reply to message #184952] Wed, 19 February 2014 15:30 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
knal wrote:
^^^^
Please fix.

> Hi PointedEars,

Hello. This is a one-to-many (or many-to-many) communications medium.
Therefore, addressing only one person is impolite towards the other
potential readers.

> With regular HTML i meant basic HTML, submitted with basic
> WYSIWYG-features like links, basic text styles (b, i, u, etc.), images,
> some divs, etc. I understand this wasn't clear, sorry for that.

But even such “basic HTML” is not a regular language because many element
types can be part of their own content.

> Regarding the RTFM: I've read on the regex, and also understood it's not
> intended for what I want to use it for.

That depends on *how* you use it. Because HTML is not a regular language,
unless you would accept only a subset of HTML that is regular, a single
application of a single regular expression will not suffice (even if that
expression is not a regular one in the computer-science sense of the term).

> I've come here for help here because I was unable to find a similar
> situation which could aid me to my solution nor was i able to find any
> other method I could use.

In general, you are looking for a markup parser (which is an implementation
of a push-down automaton, a PDA). Either write one yourself (you *can* use
regular expressions there) or use those that are available (Christoph has
pointed out a reasonable one).

> [Top post]

<http://www.netmeister.org/news/learn2quote.html>

--
PointedEarsa
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Career Opportunities in Singapore (PHP Tech Lead)
Next Topic: PHP script to get name of file which houses the script?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 16:30:48 GMT 2024

Total time taken to generate the page: 0.03908 seconds