DATA Step, Macro, Functions and more

How to check and save subscript or superscript of any word

Reply
Occasional Contributor
Posts: 11

How to check and save subscript or superscript of any word

 Dear All,

 

Requesting you help me for the below requirement.

 

How to check and save the subcript or superscript available with the string . If string have subscript or superscript then how can we identify and save that in sepearate variable.

 

Any specific function available?

 

Please assist

Super User
Posts: 7,868

Re: How to check and save subscript or superscript of any word

Please supply example data (a data step that creates a dataset; use the macro provided in https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to convert your dataset to a datastep, if you don't want to write it yourself) to illustrate your issue, and an example of the expected output/result.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,343

Re: How to check and save subscript or superscript of any word

Since there are a number of different ways to set subscript or superscript in a document you may well find this a problematic question.

If your source is a word processor document then a program would have to read the codes the individual program uses, if the results are the use of special font then another approach would be needed.

If you are searching for a fixed list of words or strings that may be possible without actually knowing whether the original is or not.

 

And then it will also help to know what you will actually do with that information.

 

So a very specific example will be needed.

Occasional Contributor
Posts: 11

Re: How to check and save subscript or superscript of any word

Sorry for late reply.

 

Actually i am working onn patient narrative . Here in Investigator term variable , i can get the subcript so i need to identify it and write the explaination about it. 

I dont need to set the subcript on any values or variables, Actually i want to identify and find if subscript present in my investigator term variable , if present then , i need to access it and explain in patient narrative that i am creating using SAS ODS and PROC STREAM.

 

I have also attached the narrative part . please assist. 

Ask a Question
Discussion stats
  • 3 replies
  • 102 views
  • 2 likes
  • 3 in conversation