Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7759183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:33:46+00:00 2026-06-01T13:33:46+00:00

I have observations that have 1 dollar signs ($), and observations that have 2

  • 0

I have observations that have 1 dollar signs ($), and observations that have 2 dollar signs ($). I want to assign different values to each type of observation. It should look something like this:

“$200 $300” gets assigned 1.
“$200” gets assigned 2.

I’ve tried playing with Perl wildcards all day but no luck.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:33:47+00:00Added an answer on June 1, 2026 at 1:33 pm

    How about the SAS countc() function to count the number of times ‘$’ appears?

    %put %sysfunc(countc($300 $400,'$'));  /* returns 2 */
    %put %sysfunc(countc($300 ,'$'));      /* returns 1 */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a several data sets with 75,000 observations and a type variable that
I have a time series(a csv file) data that looks like below. Each observation
I have a set of 100 observations where each observation has 45 characteristics. And
I have raw observations of 500 numeric values (ranging from 1 to 25000) in
I have a data set with 1000 observations. I want to only print out
I have a Tomcat server deployed that receives observations transmitted from sensors in JSON
I have panel data with observations in different week-days to run a Multinomial Logistic
I have a dataset that contains observations for every second of four consecutive days
I have a number of observations that is a count of a certain event
I have a data.frame with 2 columns dates=dates of observations for each station and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.