Substring untill end of word. How to get lenght?

Hi, I have such string:

Test test test Test test test Test test test Job TextINeed Test test testTest test test.

I have this text as notes variable. I do first thing so the Index of Job. After that I do : notes.Substring(intIndexJob+4,???). I dont know how to get the lenght till I see space or till end of the word. Any ideas?


we can do it with regex:

Have a look here for some basics

@logan.capp ,

use string.Length function

ye but how get this string?

@logan.capp ,

Try like the below code, I assume you will have “job” always in the input string

notes.Split("job".ToCharArray, StringSplitOptions.RemoveEmptyEntries)(1).ToString
1 Like

Yes, I have, works :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.