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 4253768
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:59:25+00:00 2026-05-21T04:59:25+00:00

I got a list of strings. And I want to check for every string

  • 0

I got a list of strings. And I want to check for every string in there. Sometimes, a string can have the suffix _anim(X) where X is an integer. If such string has that kind of suffix, I need to check for all other strings that have the same “base” (the base being the part without suffix) and finally group such strings and send them to my function.

So, given the next list:

Man_anim(1)

Woman

Man_anim(3)

Man_anim(2)

My code would discover the base Man has a special suffix, and will then generate a new list grouping all Man objects and arrange them depending on the value inside parenthesis. The code is supposed to return

Man_anim(1)

Man_anim(2)

Man_anim(3)

And send such list to my function for further processing.

My problem is, how can I check for the existence of such suffix, and afterwards, check for the value inside parenthesis?

  • 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-05-21T04:59:26+00:00Added an answer on May 21, 2026 at 4:59 am

    If you know that the suffix is going to be _anim(X) every time (obviously, with X varying) then you can use a regular expression:

    Regex.IsMatch(value, @"_anim\(\d+\)$")
    

    If the suffix isn’t at least moderately consistent, then you’ll have to look into data structures, like Suffix Trees, which you can use to determine common structures in strings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a list of string and now I want to take the
I have an object that looks like this. List<List<string>> MyData; The inner List<string> can
I've got two List<Name> s: public class Name { public string NameText {get;set;} public
Let's say I've got: Dim los1 as New List(Of String) los1.Add(Some value) Dim los2
Got a List of ClientContacts --- which have EITHER a LastName (in the case
I've got several list items, when I click on the item I want the
I have as List of strings with where i remove each duplicates, now I
I have the following Map: Map<String, List<String>> map = new HashMap<String, List<String>>(); which is
I got a boolean list with 92 booleans, I want the list to be
Let's say I've got a list of strings with Swedish words: banan , äpple

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.