I would like to perform following operation on SMS text that I receive.
1. Find if it contains certain word
2. Find location of word in string
3. Count the no of their occurances of word in the string.
4. Remove empty lines in multi line string .
Regards
String processing
Moderator: Martin
Re: String processing
Hi,
Please check the help page of action Script (or on the website here: http://automagic4android.com/en/help/co ... ion_script).
Following functions could be useful:
Martin
Please check the help page of action Script (or on the website here: http://automagic4android.com/en/help/co ... ion_script).
Following functions could be useful:
- Boolean contains(String s, String search)
- Number indexOf(String s, String search)
- Number indexOf(String s, String search, Number start)
- String replaceAll(String s, String regex, String replacement)
Martin
-
- Posts: 18
- Joined: 07 Dec 2013 05:59
Re: String processing
I want to split the string based on nature of character i.e. alphabet,number,special character
Example -
String -ABC DETAILS 123456 ##$
RESULT -
ABC DETAILS
123456
##$
How Do I do that?
regards
Example -
String -ABC DETAILS 123456 ##$
RESULT -
ABC DETAILS
123456
##$
How Do I do that?
regards
Re: String processing
Use:apshergill91 wrote:I want to split the string based on nature of character i.e. alphabet,number,special character
Example -
String -ABC DETAILS 123456 ##$
RESULT -
ABC DETAILS
123456
##$
How Do I do that?
regards
Code: Select all
List split(String s, String pattern)
Splits the string s into a list of strings by using the regular expression pattern as the delimiter. (see Regular expressions.)
See Action script and search for it
Re: String processing
The help page of action script also contains a link to a page with some examples:
http://automagic4android.com/automagic/ ... mples.html
The examples Create a list of lines from a multiline text and Create a list of words should be helpful.
http://automagic4android.com/automagic/ ... mples.html
The examples Create a list of lines from a multiline text and Create a list of words should be helpful.