Implementing wildcard string search in LINQ C#.

Currently, we don't have any implementation of wildcard searching in LINQ C#.
But we can do this through a little trick, where you convert your wildcard search string into a regex and match that regex with data on which you want to perform a search.

Have a look at this piece of code here

Here we want to search strings from the list which have a at start and b in end and any of the characters can come in between. This is the one case, you can perform a search of any case that comes to your mind.

thanks hoping that was helpful for you.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Syed Hassaan Ahmed
Syed Hassaan Ahmed

Written by Syed Hassaan Ahmed

Software Engineer (.NET , C# , JavaScript)

No responses yet

Write a response