> Hi,
> Can anyone help in breaking a lengthy string..
[quoted text clipped - 4 lines]
> 4. When parsing we should not consider the length of tags.
> I'll give some examples so that it will be easy to understand.
General approach: calculate all intervals [startPos, endPos] you don't
want to split (use regices (isn't this the plural of regex? :-/)). Then
start splitting.
(rule 4 is unclear to me)
Lasse Reichstein Nielsen - 25 May 2006 13:50 GMT
> (use regices (isn't this the plural of regex? :-/)).
Since regex (or regexp) is short for "regular expression", the more
likely plural would be regexes or regexps.
/L

Signature
Lasse Reichstein Nielsen - lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Oliver Wong - 25 May 2006 16:35 GMT
>> Hi,
>> Can anyone help in breaking a lengthy string..
[quoted text clipped - 4 lines]
>> 4. When parsing we should not consider the length of tags.
>> I'll give some examples so that it will be easy to understand.
> (rule 4 is unclear to me)
Given the examples, it sounds like the OP is hyphenating HTML data. He
doesn't want to break (in the sense of render-useless) the URLs, nor the
tags like <b>foo</b>, but for whatever reason, he's not happy with the word
wrapping that's currently done by his user agent.
Incidently, although it's never mentioned in his rules, he DOES want
word wrapping to be done in preference to hyphenating, when possible. So
newlines would have to be inserted as well.
- Oliver
> Hi,
> Can anyone help in breaking a lengthy string.
>
> ...
>
> It will be much helpful if you provide sample code..
This is quite trivial,
the kind of post one expects to find in clj.help
Anyway, is this homework,
or did you take on a task that exceeds your abilities?
Have you made a start?
> Hi,
> Can anyone help in breaking a lengthy string..
Crosspost, don't multipost:
http://www.cs.tut.fi/~jkorpela/usenet/xpost.html
- Oliver