below

>
>HEy, i am having major problems trying to work out this regular expression.
>Regular expressions are still quite new to me, and i don't fully understand
>them, so please bear with me... thanks!

regex is a different beast...  however if the text that you have isa actually as
such, it is difficult if not impossible to create one.  bottom>>>

>
>This is what i wanmt to do, turn the following block of text:
>
>if (top != self) top.location.replace(self.location.href) rcdb - Mantis
<clipped>
>Time: 0.040 seconds.
>
>
>Into a nice block of text like this below:
>
>Mantis
<clipped>
>spin and a figure-eight finale.
>
>
>CAN ANYONE WHO IS GOOD WITH REGULAR EXPRESSIONS HELP ME WITH THIS!!
>
>I HAVE AROUND 1000 PAGES TO DO THIS ON!!
>PLZ HELP!

rather than try to create a regex, a few questions which may help peopl offer a
better solution...

1) where are you getting the pages from... files? web sites? xml output?
2) do they appear as you posted in the web browser, or if you view source do
they appear a little more organized (ie: the text is formatted, just not for
HTML).

if all that you have to work with is a mix like you posted (no \n or \r\n in the
blob at all) and if there is any wide variety in the descriptions or posts...
you would have a difficult time creating a regex that would in one fell swoop
correct all your problems.

if you have cr's and lf's in the file...  we are in business.

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to