Source language: Translate to:

how to search in text file

General questions about NeoBook

Moderator: Neosoft Support

how to search in text file

Postby mohsen.zeus » Fri Jan 16, 2015 1:52 pm

hi
i need search in text file with edit text how can make it ?
sorry i can't speack good english
tnq very much
mohsen.zeus
 
Posts: 14
Joined: Mon Oct 07, 2013 9:29 am

Re: how to search in text file

Postby dpayer » Fri Jan 16, 2015 2:52 pm

mohsen.zeus wrote:hi
i need search in text file with edit text how can make it ?
sorry i can't speack good english
tnq very much


The Help File is very useful. I try to read the whole thing once a year.
Search String (SearchStr) is the command you want:


SearchStr

Purpose:
Search for characters within a text string.

Category:
Strings

Syntax:
SearchStr "search for" "string" "variable" "options"

search for

The characters to find.

string

The text string to search.

variable

The name of a variable to store the position of the found characters. The variable will contain 0 (zero) if the characters are not present in the string.

options

Enter "CaseSensitive" here to search using the exact characters entered. Leave this parameter blank to perform a case insensitive search (upper and lower case characters are treated the same).

Example:
The following example searches for and removes all spaces from the variable [Name]:

SearchStr " " "[Name]" "[SpacePos]"
While "[SpacePos]" ">" "0"
StrDel "[Name]" "[SpacePos]" "1" "[Name]"
SearchStr " " "[Name]" "[SpacePos]" ""
EndWhile
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 5 guests

cron