Generating regular expression

US9760551B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9760551-B2
Application numberUS-201615003723-A
CountryUS
Kind codeB2
Filing dateJan 21, 2016
Priority dateJan 22, 2015
Publication dateSep 12, 2017
Grant dateSep 12, 2017

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

An example method for generating a regular expression includes: acquiring a preset character string; acquiring a to-be-collected character string in the preset character string in response to a trigger instruction; recognizing a character string before the to-be-collected character string from the preset character string, the character string before the to-be-collected character string being used as a first character string; recognizing a character string after the to-be-collected character string from the preset character string, the character string after the to-be-collected character string being used as a second character string; and generating a regular expression of the to-be-collected character string by a first preset rule according to character features of the to-be-collected character string, the first character string and the second character string. The techniques of the present disclosure generate the regular expression of the character string needed by a user.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: acquiring a preset character string; acquiring a to-be-collected character string in the preset character string in response to a trigger instruction; recognizing a character string before the to-be-collected character string from the preset character string, the character string before the to-be-collected character string being used as a first character string; recognizing a character string after the to-be-collected character string from the preset character string, the character string after the to-be-collected character string being used as a second character string; and generating a regular expression of the to-be-collected character string by a first preset rule according to character features of the to-be-collected character string, the first character string, and the second character string. 2. The method of claim 1 , wherein the first preset rule includes: returning a corresponding result and using the corresponding result as a first partial regular expression when the first character string satisfies a second preset rule. 3. The method of claim 2 , wherein the second preset rule includes: returning a first preset identifier when the first character string is not empty, the first character string is composed of numbers, and the to-be-collected character string is empty. 4. The method of claim 2 , wherein the second preset rule includes: returning a first preset identifier when the first character string is not empty, the first character string is composed of numbers, and the first character of the to-be-collected character string is not a number. 5. The method of claim 2 , wherein the second preset rule includes: returning a second preset identifier when the first character string is not empty, the first character string is composed of word characters including letters, and the to-be-collected character string is empty, or the first character of the to-be-collected character string is not a word character. 6. The method of claim 2 , wherein the second preset rule includes: returning a third preset identifier when the first character string is not empty, the first character string is composed of non-empty characters, and the to-be-collected character string is an empty character string, or the first character of the to-be-collected character string is an empty character. 7. The method of claim 2 , wherein the second preset rule includes: returning a fourth preset identifier when the first character string is empty. 8. The method of claim 1 , wherein the first preset rule includes: returning a corresponding result and using the corresponding result as a first partial regular expression when the to-be-collected character string satisfies a third preset rule. 9. The method of claim 8 , wherein the third preset rule includes: returning a fifth preset identifier when the to-be-collected character string is not empty, the first character of the to-be-collected character string is a separator, and the first character string does not include a first character of the to-be-collected character string. 10. The method of claim 8 , wherein the third preset rule includes: returning a sixth preset identifier when the to-be-collected character string is empty. 11. The method of claim 1 , wherein the first preset rule includes: returning a corresponding result and using the corresponding result as a first partial regular expression when the first character string satisfies a fourth preset rule. 12. The method of claim 11 , wherein the fourth preset rule includes: defining a first preset variable; sequentially traversing characters in the first character string; determining whether a respective character in the first character string is a separator; appending the respective character to the first preset variable in response to determining that the respective character is the separator. 13. The method of claim 12 , wherein, when all characters in the first character string are traversed, the fourth preset rule further includes returning the first preset variable. 14. The method of claim 12 , wherein, when the characters in the first character string are not all traversed, and a character string which is not traversed does not include the separators, the fourth preset rule further includes: acquiring the character string which is not traversed in the first character string, and using the character string which is not traversed in the first character string as the first character string. 15. The method of claim 14 , further comprising: appending the returned result to the first preset variable, and returning the first preset variable when the first character string satisfies the second preset rule. 16. The method of claim 14 , further comprising: appending the returned result to the first preset variable, and returning the first preset variable when the first character string satisfies the fourth preset rule. 17. The method of claim 12 , wherein, when the characters in the first character string are not all traversed, and a character string which is not traversed includes a separator, the fourth preset rule further includes: acquiring the character string which is not traversed in the first character string; and separating the character string which is not traversed into a character string before a first separator, the first separator and a character string after the first separator according to the first separator in the character string which is not traversed. 18. The method of claim 17 , wherein the character string before the first separator is used as the first character string, and when the first character string satisfies the second preset rule, the returned result is appended to the first preset variable. 19. A system comprising: a preset character string acquisition unit that acquires a preset character string; a to-be-collected character string acquisition unit that acquires a to-be-collected character string in the preset character string in response to a trigger instruction; a first character string acquisition unit that recognizes a character string before the to-be-collected character string from the preset character string, the character string before the to-be-collected character string being used as a first character string; a second character string acquisition unit that recognizes a character string after the to-be-collected character string from the preset character string, the character string after the to-be-collected character string being used as a second character string; and a regular expression generation unit that generates a regular expression of the to-be-collected character string by a first preset rule according to character features of the to-be-collected character string, the first character string, and the second character string. 20. One or more memories having computer-executable instructions stored thereon, executable by one or more processors, to cause the one or more processors to perform acts comprising: acquiring a preset character string; acquiring a to-be-collected character string in the preset character string in response to a trigger instruction; recognizing a character string before the to-be-collected character string from the preset character string, the character string before the to-be-collected character string being used as a first character string; recognizing a character string after the to-be-collected character string from the preset character string, the character string after

Assignees

Inventors

Classifications

  • Translation of natural language queries to structured queries · CPC title

  • G06F40/16Primary

    Automatic learning of transformation rules, e.g. from examples · CPC title

  • Formatting, i.e. changing of presentation of documents (automatic justification G06F40/189; automatic line break hyphenation G06F40/191) · CPC title

  • Physics · mapped topic

  • Physics · mapped topic

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9760551B2 cover?
An example method for generating a regular expression includes: acquiring a preset character string; acquiring a to-be-collected character string in the preset character string in response to a trigger instruction; recognizing a character string before the to-be-collected character string from the preset character string, the character string before the to-be-collected character string being us…
Who is the assignee on this patent?
Alibaba Group Holding Ltd
What technology area does this patent fall under?
Primary CPC classification G06F40/16. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Sep 12 2017 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).