![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Is there any way to find out WHERE precisely (that is, at what character index) a match occurred when using the StreamTokenizer class? Specifically, I'd like to be able to use that class for string extraction from source code, but I'd also like to be able to use the result to highlight the string in a text area that is displaying the code. Unfortunately, without a match location I have no way of synchronizing the location of the StreamTokenizer and the text area. I'd keep track of location manually during the scanning by adding up the match lengths, but StreamTokenizer discards whitespace without notifying you, so I can't even do that. Replies: |
Sponsored Links
|