How can i use regular expression search in TextRange Object?

O

ocomet

Hi Everyone..

I want to know how can I use regular expression in TextRange Object.

I wrote specific word highlighting code and it is working now.
but this is static word highlighting.

I want to emplement dynamic word highlighting using regular
expression..

I want your advice..

thanks. regards..
 
I

Ivo

I want to know how can I use regular expression in TextRange Object.

I wrote specific word highlighting code and it is working now.
but this is static word highlighting.

I want to emplement dynamic word highlighting using regular
expression.

Not sure what you mean. Regular expressions work on strings of text,
regardless of the origin or nature of that text. It may come from a
TextRange(), from a paragraph element, a user prompt, it doesn't make a
single difference.

The regex can itself be dynaically constructed using the RegExp object, or
it can be a static literal, spelled out in the script, but again, once
constructed, there is no difference and the procedure and results are all
the same.

hth
Ivo
http://4umi.com/web/javascript/
 
D

Daniel Kirsch

I want to know how can I use regular expression in TextRange Object.

You may use a range's toString method to get the text of the range. You
may than us your regExp with that string.

Daniel
 
T

Thomas 'PointedEars' Lahn

[...]
I want to know how can I use regular expression in TextRange Object.

I wrote specific word highlighting code and it is working now.
but this is static word highlighting.

I want to emplement dynamic word highlighting using regular
expression..

I want your advice..

I want popcorn.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top