words()

Read(218) Label: extract, string, english words,

Here’s how to use words() function.

s.words()

Description

Extract the English words from a string.

Syntax

s.words()

Note

The function returns a string sequence consisting of English words extracted from string s while other characters are ingnored.

Options

@d

Select the numbers out of the string s

@a

Select both the English words and the numbers out of the string s

@w

Extract all characters from a string; extract a string in Chinese /a sign as inidvidual characters and a string of English letters/a number as what they are

@i

Treat English letters in a row and continuous English letters plus numbers as a whole

Parameters

s

A string

Return value

A sequence of strings

Example

 

A

 

1

4,23,a,test?my_file 57

 

2

=A1.words()

Extract the English words form the string

3

=A1.words@d()

 

Extract numers form the string

4

=A1.words@a()

Extract English words and numers form the string

5

abc123好吗#?df34

 

6

=A5.words@w()

7

=A5.words@i()

Extract English letters in a row and continuous English letters plus numbers as a whole

8

4,-8,899,0,my,test

 

9

=A8.words@d()

A number string with the line sign “-” is parsed as a negative number