[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

How do I truncate any numbers of trailling identifier such as A 0r AAB or 1 etc)

I need to pass a variables that will receive values with trailling identifier to the database, such as
string name;;
where name at runtime could receive values such as
Global-com 1
Global - com 2
Chimon - Vacumm Fab 1A-A
Chimon - Vacumm Fab 1A-B
Chimon - Vacumm Fab 1A-C

Thanks Expert


0
Projack
Asked:
Projack
1 Solution
 
käµfm³d 👽Commented:
Assuming your identifiers will never have spaces in them:
name = name.Substring(0, name.LastIndexOf(' '));

Open in new window

0
 
ProjackAuthor Commented:
Thanks always and for been there expert kaufmed
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now