- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
For your kind information, I am trying to remove \X0A\ with a space from my text "string" using perl in base sas.
Can someone modify my code to make it functional. Although I can use tranword funtion to do so but my desire is to use perl because in future by using escape character function, I will able to use it in variety of other situations in text mining.
I am using the following code: [for text substituion=s/pattern/new text/]
data test2;
set test1;
string= prxchange("s/\/X0A\/ /",-1,string);
run;
Thank you in advance for your kind reply.
Regards,
Deepak
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If those \X0A\ are actual characters then
prxchange("s/\\X0A\\/ /io", -1, string)
will work. Note I assumed it is a zero between X and A. Correct if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
prxchange("s/\x0a/ /o", -1, string)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Does the string contain the actual sequence /X0A/ or does it contain the character='0A'x aka ascii character 10?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If those \X0A\ are actual characters then
prxchange("s/\\X0A\\/ /io", -1, string)
will work. Note I assumed it is a zero between X and A. Correct if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content