Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Searching for words in strings


From   "Wallace, John" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Searching for words in strings
Date   Tue, 14 Oct 2003 11:11:51 -0700

Dear Statalist

I'd like to search a comment field for a specific word, such as can be done with Excel's "Search(find_text,within_text,[start_num])" function.  I'd like to do it interactively, rather than as a program (it looks like a program using -tokenize- would be one approach), but the -match- and -word- string functions don't appear to be what I'm looking for.  I have a list of 1000 records, all with a "comment" field that may or may not contain a word I want, buried within an otherwise random string of characters.  What I'd like is a command that I could type in thus:

.browse if {command}("wafer",var_comment) !=.

Does such a command exist?  It seems like it would be a useful tool for browsing non-standard text fields...

 

John Wallace

Research Associate

Affymetrix Inc

[email protected]




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index