try the -substr- function:
gen newvarname = substr(original_variable, 5, .)
briefly, generate a new variable equal to the contents of the original
variable, minus the first four characters (e.g. the "www.").
type -findit substr- for more information.
hope this helps,
clint
> Hi,
> I have a variable with web addresses and all the entries in this variable
> start with "www.". Is there an easy way of removing the "www." from the
> beginning of all entries?
> Thanks!
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/