Re: Finding a pattern without regexp() - contd.
by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>
|
Date: |
Sat, 29 Apr 2000 16:42:47 +0530 |
To: |
<hwg-languages(at)hwg.org>, "Cyanide _7" <leo7278(at)hotmail.com> |
References: |
yahoo |
|
todo: View
Thread,
Original
|
|
Hi,
Since cyanide_7 wanted some info on the pattern to be matched here's the
info. I agree that a pattern matching equivalent o regexp() once developed
will be useful.
I'm basically looking for a word, so the pattern would be a space, followed
by the word entered by the user, usally 5-6 characters in length, follwed by
another space, or a sentence terminator like a (.) or (?) or (!)
Finally I will be extending this to handle wild cards also. And as you can
see this is the part where regexp() comes in!
Since I'm also be porting this to other platforms, which may or may not have
indexOf() functions, I can't use them. Another version of this may be using
a file as the data source, so I'm looking at something versatile enough to
also handle a data stream.
-Srini
P.S: I come up with the vaguest problems don't I?
----- Original Message -----
From: Srinivasan Ramakrishnan <srinivar(at)md3.vsnl.net.in>
To: <hwg-languages(at)hwg.org>
Sent: Saturday, April 29, 2000 10:20 AM
Subject: Finding a pattern without regexp()
| Hi,
|
| I need to find a pattern in a string using JS. Because of browser
| compatability I can't use regexp(). Do any of you know what has to be
done?
| Any code in C, Pascal or Java is ok as well.
|
| I have a vague idea about a pattern matching technique using stacks, but
I'm
| not very clear on that. Any pointers will be appreciated.
|
| Cheers,
| -Srini
|
|
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA