Community & Support
Learn
Marketplace
Discussions
Categories
Discussions
General
Platform
Academic
Partner
Regional
User Groups
Documentation
Events
Altair Exchange
Share or Download Projects
Resources
News & Instructions
Programs
YouTube
Employee Resources
This tab can be seen by employees only. Please do not share these resources externally.
Groups
Join a User Group
Support
Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
Removing a word from list of words
Anusha
Hello All!
a dataset has 2 columns, one column has a list of words, I want to remove the last word including special characters(in this eg, [,.?]) is it possible?
Source data:
reg_no text
1 In,a,data,base,,,
2 at,palace,he,has,?,????,
required data:
reg_no text
1 In,a,data
2 at,palace,he
Find more posts tagged with
AI Studio
Accepted answers
kayman
@Anusha
, use regex.
The idea is that you want to keep everything till the last comma followed by a word.
^(.*),\w+.*
Not fully tested but it should do the trick.
use the replace operator with above snippet, and replace with $1
You can play with the regex here :
https://regex101.com/r/URTvjo/1
All comments
kayman
@Anusha
, use regex.
The idea is that you want to keep everything till the last comma followed by a word.
^(.*),\w+.*
Not fully tested but it should do the trick.
use the replace operator with above snippet, and replace with $1
You can play with the regex here :
https://regex101.com/r/URTvjo/1
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups