FYI, I noticed my regex didn't handle parenthesis nicely, so I added
some more characters to it.
tags.match(/(\[{2}((\w*|\.*|\s?|\?*|\!*\(*|\)*|\'*\"*\&*)\s?)+\]{2})|
((\w*|\.*|\?*|\!*\(*|\)*|\'*\"*\&*)+)/gi)
now works well on a set of tags like this:
Tag1 (Something) (something2 something3) [[Something (else)]]
[[(something else)]] [[(something)else (no?)]][[another tag]] moretags
tag.one [[her's]] paul's [[david's meeting]][[feb. 16th asdf]]
something [[somethingelse]] somethingelse? "this" us&them
[[something's got's to. No? give!]] period. [[three word tag]]
[wrongtag] wonder's [[[three brackets]]] [one bracket] these's
those.twice.again periods.twice.
Separates into:
Tag1
(Something)
(something2
something3)
[[Something (else)]]
[[(something else)]]
[[(something)else (no?)]]
[[another tag]]
moretags
tag.one
[[her's]]
paul's
[[david's meeting]]
[[feb. 16th asdf]]
something
[[somethingelse]]
somethingelse?
"this"
us&them
[[something's got's to. No? give!]]
period.
[[three word tag]]
wrongtag
wonder's
[[three brackets]]
one
bracket
these's
those.twice.again
periods.twice.
In fact, it parses better than readBracketedList! So, give it a try!
Cheers,
David.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.