Sign in to follow this  
Followers 0
gosu

Howto find a substring in a string?

4 posts in this topic

hey,

I´d like to have a way to find out if a substring is in a string.

Example:

$asdf ="blablablablalbabla[iMPORTANT]blablablblalblablalba"

And I want to cut the [iMPORTANT] out and store it in another string. How?


[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites



hey,

I´d like to have a way to find out if a substring is in a string.

Example:

$asdf ="blablablablalbabla[iMPORTANT]blablablblalblablalba"

And I want to cut the [iMPORTANT] out and store it in another string. How?

<{POST_SNAPBACK}>

Did you type SubString in the search of the Helpfile ?

What was at the top of the list ? :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Did you type SubString in the search of the Helpfile ?

What was at the top of the list ?  :)

<{POST_SNAPBACK}>

ooooooooooooooh silly me :)

thanks found it ;)


[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

If you want to remove the substring, look into StringReplace. Pass a null string ("") as the replace string and it will remove the substring for you.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0