View Single Post
Old 07-20-2011, 03:47 AM   #82
burbleburble
Connoisseur
burbleburble began at the beginning.
 
Posts: 52
Karma: 38
Join Date: Jun 2011
Device: Kindle 3
Examples:

Code:
<p>This is an example</p><p>of a broken paragraph</p>
- I need to be able to recognize with regex in js that there is a paragraph break in middle of this sentence. (i.e. the word 'example' ends a paragraph with no punctuation such as a period, etc.).

Code:
<p><span>Bob <span> went to</span> the <span> market</span>. </span></p>
- I need to be able to match such a sentence, without the tags getting in the way. Unfortunately, regex that I know of doesn't support repeating strings, only characters: I can't write (<[^>]>)*.. and then there would still be the problem of gathering all the variable amount of matches (\1=Bob , \2= went to, etc... in this case)

I've gotta assume someone's figured these issues out. I can't imagine how it hasn't come up before in the world of programming! But I googled and searched and couldn't find answers... Thanks for any help!
burbleburble is offline   Reply With Quote