Re: EdSharp - Another Regular Expression Question
- From: "tribble" <lauraeaves@xxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 09:38:10 -0500
I'd be curious if this could be done in edsharp--or rather, how extensive is
the regular expression handling in edsharp?
First of all, since the text you want to highlight can and probably will
span several lines, a standare ed-like regular expression wouldn't work,
unless you could set a state variable "highlighted" to true when you hit the
"<note>" delimiter, then unset it when you hit the "</note>" delimiter. --
and of course you need to save the positions of those delimiters.
This joggles my memory of lexing verses parsing -- where lexing only uses
regular expressions to tokenize the text, and the parser takes the tokens
and applies a grammar (which goes beyond the capabilities of regular
expressions) to translate the strings of tokens to internal data structures.
In C, the comments (with delimiters /* and */) are handled by the lexer, but
the regular expression doesn't do it directly -- you have to enter a comment
state where you pretty much eat all the text until the closing delimiter.
So my question is, does edsharp support this kind of thing?
--le
----- Original Message -----
From: <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, July 30, 2008 8:42 AM
Subject: EdSharp - Another Regular Expression Question
Hi,
I'm using EdSharp. I'm reading a book. I want to create a sort of fake
highlighting kind of like a sighted person would use to mark up a book,
only mine would work like this. I see something in a book that I want to
come back to and possibly extract out of the book. I want to make an
opening tag and a closing tag around the text. The tag is going to be
something like <note> </note>. Then, I want to construct a regular
expression that would search for <note> followed by any text or no text
that is allowed to span multiple lines, followed by </note>. I want to
extract the text excluding the tag. How do I construct the regular
expression that does this?
Thanks.
Jim
James D Homme, Usability Engineering, Highmark Inc.,
james.homme@xxxxxxxxxxxx, 412-544-1810
"it is only possible to live happily ever after on a day-to-day basis." --
Margaret Bonnano
Highmark internal only: For usability and accessibility:
http://highwire.highmark.com/sites/iwov/hwt093/
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
- Follow-Ups:
- Re: EdSharp - Another Regular Expression Question
- From: Jamal Mazrui
- References:
- EdSharp - Another Regular Expression Question
- From: james . homme
Other related posts:
- » EdSharp - Another Regular Expression Question
- » Re: EdSharp - Another Regular Expression Question
- » Re: EdSharp - Another Regular Expression Question
- » Re: EdSharp - Another Regular Expression Question
- Re: EdSharp - Another Regular Expression Question
- From: Jamal Mazrui
- EdSharp - Another Regular Expression Question
- From: james . homme