Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Find word in string

Subject: Find word in string

From: Fraser Dickson

Date: 30 Jul, 2010 16:56:04

Message: 1 of 3

Hi i have a large string with around 5000 characters is there a way that i can find a particular word in this this string and tell me its position within the string

Thanks

Subject: Find word in string

From: Sean

Date: 30 Jul, 2010 17:05:03

Message: 2 of 3

"Fraser Dickson" <fraser.dickson@gmail.com> wrote in message <i2v074$b72$1@fred.mathworks.com>...
> Hi i have a large string with around 5000 characters is there a way that i can find a particular word in this this string and tell me its position within the string
>
> Thanks

strfind('lots of words! Look another word','word')

Subject: Find word in string

From: Walter Roberson

Date: 30 Jul, 2010 17:12:33

Message: 3 of 3

Fraser Dickson wrote:
> Hi i have a large string with around 5000 characters is there a way
> that i can find a particular word in this this string and tell me its
> position within the string

strfind()

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us