CN109241504A - A kind of character string replacement method, device, computer equipment and computer readable storage medium - Google Patents

A kind of character string replacement method, device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN109241504A
CN109241504A CN201811023311.4A CN201811023311A CN109241504A CN 109241504 A CN109241504 A CN 109241504A CN 201811023311 A CN201811023311 A CN 201811023311A CN 109241504 A CN109241504 A CN 109241504A
Authority
CN
China
Prior art keywords
character string
replaced
text
string
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201811023311.4A
Other languages
Chinese (zh)
Inventor
葛庆杰
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Wisdom Longtuteng Intellectual Property Co Ltd
Original Assignee
Hefei Wisdom Longtuteng Intellectual Property Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Wisdom Longtuteng Intellectual Property Co Ltd filed Critical Hefei Wisdom Longtuteng Intellectual Property Co Ltd
Priority to CN201811023311.4A priority Critical patent/CN109241504A/en
Publication of CN109241504A publication Critical patent/CN109241504A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention is suitable for technical field of data processing, provides a kind of character string replacement method, which comprises in response to the character string replacement request of user, to user's output string typing page;Receive the first character string to be replaced, the second character string to be replaced that user is inputted by the character string typing page, and first object character string corresponding with the first character string to be replaced and the second character string to be replaced, the first character string to be replaced and the second character string to be replaced are present in text;By in text the first character string to be replaced and the second character string to be replaced replace with first object character string.First character string to be replaced and the second character string to be replaced quickly can be replaced with first object character string by the replacement method, realize many-one alternative patterns, without replacing one by one item by item, and it is not limited by number of characters, it is easy to operate quick, break traditional one-to-one alternative patterns, use scope is wider, the replacement of a large amount of character strings, meets the needs of people suitable for text.

Description

A kind of character string replacement method, device, computer equipment and computer-readable storage Medium
Technical field
The present invention relates to technical field of data processing, and in particular to a kind of character replacement method, device, computer installation and Computer readable storage medium.
Background technique
It can encounter often at work and need to carry out character replacement, replacement is certainly time-consuming and laborious manually, it will usually use Character replaces tool.
Existing character replaces tool, when a large amount of characters need to replace in facing text, needs for each character one One input, is replaced one by one;Especially in actual process, when be related in text numerous characters be required to replace with it is different When character, it is still desirable to which each character inputs replacement one by one, i.e., after the replacement of a upper character, could input next word Symbol, is replaced.
It can be seen that existing character alternative, relatively complicated by the way of replacing one by one, use scope is relatively narrow, It is not suitable for the replacement of a large amount of character strings, is not able to satisfy the demand of people.
Summary of the invention
The embodiment of the present invention provides a kind of character string replacement method, it is intended to solve existing character string alternative use scope It is relatively narrow, the problem of not being suitable for the replacement of a large amount of character strings, be not able to satisfy the demand of people.
The embodiment of the invention provides a kind of character string replacement methods, which comprises
In response to the character string replacement request of user, to user's output string typing page;
Receive the first character string to be replaced, the second character to be replaced that user is inputted by the character string typing page String, and first object character string corresponding with the described first character string to be replaced and the second character string to be replaced, described first Character string to be replaced and the second character string to be replaced are present in text;
By in the text the first character string to be replaced and the second character string to be replaced replace with first object character String.
The embodiment of the invention provides a kind of character string alternative, described device includes:
Input unit, for the character string replacement request in response to user, to user's output string typing page;
Receiving unit, for receiving the first character string to be replaced, that user inputted by the character string typing page Two character strings to be replaced, and first object character corresponding with the described first character string to be replaced and the second character string to be replaced String, first character string to be replaced and the second character string to be replaced are present in text;
Replacement unit, for by the text the first character string to be replaced and the second character string to be replaced replace with First object character string.
The embodiment of the invention also provides a kind of computer equipment, the computer equipment includes processor, the processing The step of device is for realizing above-mentioned character string replacement method when executing the computer program stored in memory.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, described The step of above-mentioned character string replacement method is realized when computer program is executed by processor.
In the embodiment of the present invention, by the character string replacement request in response to user, to user's output string typing page Face;The first character string to be replaced, the second character string to be replaced that user is inputted by the character string typing page are received, and First object character string corresponding with the described first character string to be replaced and the second character string to be replaced, first word to be replaced Symbol string and the second character string to be replaced are present in text;By the first character string to be replaced in the text and second to be replaced Character string replaces with first object character string.The present invention can be quickly by the first character string to be replaced and the second character to be replaced String replaces with first object character string, realizes many-one alternative patterns, without replacing one by one item by item, and is not limited by number of characters System, it is easy to operate quick, break traditional one-to-one alternative patterns, use scope is wider, a large amount of character strings suitable for text Replacement, meet the needs of people.
Detailed description of the invention
Fig. 1 is a kind of implementation flow chart for character string replacement method that the embodiment of the present invention one provides;
Fig. 2 is a kind of implementation flow chart of character string replacement method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of implementation flow chart for character string replacement method that the embodiment of the present invention three provides;
Fig. 4 is a kind of implementation flow chart for character string replacement method that the embodiment of the present invention four provides;
Fig. 5 is a kind of implementation flow chart for character string replacement method that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for character string alternative that the embodiment of the present invention six provides;
Fig. 7 is a kind of structural schematic diagram for character string alternative that the embodiment of the present invention seven provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments The present invention.Packet is also intended in the "an" and "the" of the embodiment of the present invention and singular used in the attached claims Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is Refer to and includes that one or more associated any or all of project listed may combine.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe herein various information, But unless stated otherwise, these information should not be limited by these terms.These terms are only used to same type of information area each other It separates.For example, in the case where not departing from scope of the present application, the first character string to be replaced can be known as second wait replace Character string is changed, and similarly, the second character string to be replaced can be known as the first character string to be replaced.
In embodiments of the present invention, character string replacement method can be applied in terminal;Terminal includes intelligent terminal, intelligence Terminal device can be implemented in a variety of manners.For example, laptop, digit broadcasting receiver, PMP (portable multimedia Player) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Hereinafter it is assumed that intelligence is eventually End is fixed intelligent terminal.
The technical means and efficacy taken in order to which the present invention is further explained for the predetermined goal of the invention of realization, below in conjunction with Attached drawing and preferred embodiment, to specific embodiment, structure, feature and its effect according to the present invention, detailed description are as follows.
Character string replacement method provided in an embodiment of the present invention, it is defeated by the character string typing page by receiving user First entered character string to be replaced, the second character string to be replaced, and it is to be replaced with the described first character string to be replaced and second The corresponding first object character string of character string, and by the first character string to be replaced and the second character string to be replaced in the text Replace with first object character string;It on the one hand, can be quickly equal by the first character string to be replaced and the second character string to be replaced First object character string is replaced with, is not limited by number of characters, many-one character string alternative patterns are realized, without operating one by one item by item Replacement;On the other hand, this method is easy to operate quick, and use scope is wider, the replacement of a large amount of character strings suitable for text, full The demand of sufficient people.
Embodiment one
Fig. 1 shows a kind of implementation flow chart of character string replacement method of the offer of the embodiment of the present invention one, and details are as follows:
In step s101, in response to the character string replacement request of user, to user's output string typing page.
In embodiments of the present invention, the character string typing page can be text box or other forms, including word to be replaced Symbol string and the input frame of target string are respectively used to input character string to be replaced and corresponding with the character string to be replaced Target string.
In step s 102, the first character string to be replaced that user inputted by the character string typing page, the are received Two character strings to be replaced, and first object character corresponding with the described first character string to be replaced and the second character string to be replaced String, first character string to be replaced and the second character string to be replaced are present in text.
In embodiments of the present invention, the first character string to be replaced, the second character string to be replaced are present in text, can be with It is the improper word of multiple characters composition adjacent in word present in text or single word or text, and to word Number no requirement (NR) is accorded with, for example, a text is " to receive the first word to be replaced that user is inputted by the character string typing page Symbol string ", the character string for needing to replace can be normal word " reception ", be also possible to adjacent multiple characters " typing of symbol string ", Depending on user demand, specifically herein with no restrictions.
In embodiments of the present invention, first object character string is for replacing the first character string to be replaced in text, second Character string to be replaced equally can be arbitrary monocase or more character styles.
In embodiments of the present invention, the first of character string typing page input the character string to be replaced, second to be replaced By separators between character string, such as the first character string to be replaced is A, the second character string to be replaced is B, in word to be replaced Accord with string input frame in be shown as " A, B ", separator can for ", " or ";" or ", " or " { } " etc.;Or by wait replace Two sashes of setting in the input frame of character string are changed, for the first character string to be replaced of input and the second character to be replaced respectively String, as long as can will be distinguished between different character strings to be replaced, specifically herein with no restrictions.
In step s 103, by the text the first character string to be replaced and the second character string to be replaced replace with First object character string.
In embodiments of the present invention, by the text the first character string to be replaced and the second character string to be replaced replace It is changed to first object character string, comprising: such as by the first character string A to be replaced, the second character string B to be replaced, first object character String C, then replace with character C for character A, B all in text.
Character string replacement method provided in an embodiment of the present invention, it is defeated by the character string typing page by receiving user First entered character string to be replaced, the second character string to be replaced, and it is to be replaced with the described first character string to be replaced and second The corresponding first object character string of character string, and by the first character string to be replaced and the second character string to be replaced in the text Replace with first object character string;It on the one hand, can be quickly equal by the first character string to be replaced and the second character string to be replaced First object character string is replaced with, is not limited by number of characters, many-one character string alternative patterns are realized, without operating one by one item by item Replacement;On the other hand, this method is easy to operate quick, and use scope is wider, the replacement of a large amount of character strings suitable for text, full The demand of sufficient people.
Embodiment two
Fig. 2 shows a kind of implementation processes of character string replacement method provided by Embodiment 2 of the present invention, with embodiment One is similar, the difference is that, the step S103 is further comprising the steps of:
In step s 201, with the first character string to be replaced of character string typing page input, the second word to be replaced Symbol string is querying condition, searches and obtain the position of the described first character string to be replaced, the second character string to be replaced in the text Information.
In embodiments of the present invention, with the first character string to be replaced of character string typing page input, second wait replace Changing character string is querying condition, searches and obtain the described first character string to be replaced, the second character string to be replaced in the text Location information specifically includes: according to the first character string to be replaced, the second character string to be replaced of user's input, traversing entire text This, and its institute position in the text is obtained, such as the first character string " A " to be replaced, the second character string " B " to be replaced, with A, B For querying condition, all characters in text " HIANDKIGAIJFDGBD " are traversed, obtain the position in the locating text of A, B difference, That is A is in the position of the first row third in text, nine characters, and B is in the position of the 15th character of the first row in text.
In step S202, the character string of the corresponding position of the location information is replaced with into first object character string.
In embodiments of the present invention, the character string of the corresponding position of the location information is replaced with into first object character String, specifically includes: such as the first character string " A " to be replaced, the second character string " B " to be replaced, first object character string " C ", text " HIANDKIGAIJFDGBD ", i.e. A are in the position of the first row third in text, nine characters, and B is in the first row in text The position of 15 characters, will be on the position of the first row third in text, the position of nine characters and the 15th character Character replaces with C.
Character string replacement method provided in an embodiment of the present invention, it is to be replaced with the first of character string typing page input Character string, the second character string to be replaced are querying condition, search in the text and obtain the described first character string to be replaced, second The location information of character string to be replaced;The character string of the corresponding position of the location information is replaced with into first object character string; The first character string to be replaced and the second character string to be replaced all in text quickly and accurately can be replaced with into the first mesh Character string is marked, easy to operate quick, use scope is wider, and the replacement of a large amount of character strings, meets the need of people suitable for text It asks.
Embodiment three
Fig. 3 shows a kind of implementation process of character string replacement method of the offer of the embodiment of the present invention three, with embodiment Two is similar, the difference is that, the step S202 is further comprising the steps of:
In step S301, the location information of first be successively read in text character string to be replaced believes the position The first character string to be replaced for ceasing corresponding position replaces with first object character string.
In embodiments of the present invention, the location information of first be successively read in text character string to be replaced, by institute's rheme The first character string to be replaced that confidence ceases corresponding position replaces with first object character string, specifically includes: as first is to be replaced Character string " A ", first object character string " C ", text " HIANDKIGAIJFDGBD ", i.e. A are in the first row third, nine in text The position of a character, by the first row third in text, nine characters position on character replace with C.
In step s 302, it is successively read the location information of the second character string to be replaced in text, by the location information The character string to be replaced of the second of corresponding position replaces with first object character string.
In embodiments of the present invention, it is successively read the location information of the second character string to be replaced in text, by the position Second character string to be replaced of the corresponding position of information replaces with first object character string, specifically includes: such as the second word to be replaced Symbol string " B ", first object character string " C ", text " HIANDKIGAIJFDGBD ", i.e. B are in text the first row the 15th Character in text on the position of the 15th character of the first row is replaced with C by the position of character.
Character string replacement method provided in an embodiment of the present invention passes through the be successively read in text first character string to be replaced Location information, the first character string to be replaced of the corresponding position of the location information is replaced with into first object character string, according to The location information of second character string to be replaced in secondary reading text, by the second word to be replaced of the corresponding position of the location information Symbol string replaces with first object character string;It can be accurately to be replaced by the first character string to be replaced all in text and second Character string replaces with first object character string, and easy to operate quick, use scope is wider, a large amount of character strings suitable for text Replacement, meet the needs of people.
Example IV
Fig. 4 shows a kind of implementation process of character string replacement method of the offer of the embodiment of the present invention four, with embodiment Two is similar, the difference is that, the step S202 is further comprising the steps of:
In step S401, while reading the position of the first character string to be replaced in text, the second character string to be replaced Information.
In embodiments of the present invention, while the first character string to be replaced in text, the second character string to be replaced being read Location information specifically includes: such as the first character string " A " to be replaced, the second character string " B " to be replaced traverses text All characters in " HIANDKIGAIJFDGBD ", obtain the position in the locating text of A, B difference, i.e. A is in the first row in text The position of third, nine characters, B are in the position of the 15th character of the first row in text;The first row in text is read simultaneously Third, nine characters the 15th character in position and the first row location information.
In step S402, by the first character string to be replaced and the second word to be replaced of the corresponding position of the location information Symbol goes here and there while replacing with first object character string.
Character string replacement method provided in an embodiment of the present invention, by reading the first character to be replaced in text simultaneously The location information of string, the second character string to be replaced, by the first character string to be replaced of the corresponding position of the location information and the Two character strings to be replaced replace with first object character string simultaneously;It can be quickly and accurately by text all first wait replace It changes character string and the second character string to be replaced replaces with first object character string, easy to operate quickly use scope is wider, fits For the replacement of character strings a large amount of in text, meets the needs of people.
Embodiment five
Fig. 5 shows a kind of implementation process of character string replacement method of the offer of the embodiment of the present invention five, with embodiment One is similar, the difference is that, the step S102 is further comprising the steps of:
In step S501, the first character string to be replaced that user inputted by the character string typing page, the are received Two character strings to be replaced, third character string to be replaced, the 4th character string to be replaced, and with the described first character string to be replaced and The corresponding first object character string of second character string to be replaced, with third character string to be replaced and the 4th character string to be replaced Corresponding second target string, first character string to be replaced, the second character string to be replaced, third character string to be replaced and 4th character string to be replaced is present in text.
In embodiments of the present invention, the first character string to be replaced, the second character string to be replaced, third character string to be replaced, 4th character string to be replaced is present in text, can be phase in word present in text or single word or text The improper word of adjacent multiple characters composition, and to character number no requirement (NR), for example, a text is " to receive user to pass through First character string to be replaced of the character string typing page input ", the character string for needing to replace can be normal word and " connect Receive ", it is also possible to adjacent multiple characters " typing of symbol string ", depending on user demand, specifically herein with no restrictions.
In embodiments of the present invention, first object character string is for replacing the first character string to be replaced in text, second Character string to be replaced;Second target string is for replacing the character string to be replaced of the third in text, the 4th character string to be replaced; It equally can be arbitrary monocase or more character styles.
In embodiments of the present invention, the first character string to be replaced and second that the character string typing page inputs are to be replaced It needs to pass through separators between character string and third character string to be replaced and the 4th character string to be replaced;And second to It needs to be separated with another separator between substitute character string and third character string to be replaced, such as the first character string to be replaced It is " B " for " A ", the second character string to be replaced, third character string to be replaced " C ", the 4th character string " D " to be replaced, first object Character string " E ", the second target string " F ";" { A } { B }, { C } { D } " is shown as in the input frame of character string to be replaced, Be shown as in the input frame of target string " { E }, { F } " separator can for ", " or ";" or ", " or " { } " etc.;Or By the way that several sashes are arranged in the input frame of character string to be replaced or target string, for inputting kinds of characters string respectively, As long as can will be distinguished between kinds of characters string, specifically herein with no restrictions.
The step S103, further comprising the steps of:
In step S502, by the text the first character string to be replaced and the second character string to be replaced replace with First object character string;Third substitute character string, the 4th substitute character string in the text are replaced with into the second target character String.
In embodiments of the present invention, by the text the first character string to be replaced and the second character string to be replaced replace It is changed to first object character string;Third substitute character string, the 4th substitute character string in the text are replaced with into the second target Character string specifically includes: as the first character string to be replaced is " A ", the second character string to be replaced is " B ", third character to be replaced String " C ", the 4th character string " D " to be replaced, first object character string " E ", the second target string " F ";By the character in text String A, B replace with E, and character string C, D in text is replaced with character string F.
Character string replacement method provided in an embodiment of the present invention receives what user was inputted by the character string typing page First character string to be replaced, the second character string to be replaced, third character string to be replaced, the 4th character string to be replaced, and with institute State the first character string to be replaced and the corresponding first object character string of the second character string to be replaced, with third character to be replaced String second target string corresponding with the 4th character string to be replaced;By the first character string to be replaced and second in the text Character string to be replaced replaces with first object character string;By third substitute character string, the 4th substitute character string in the text Replace with the second target string;It on the one hand, can be quickly by the first character string to be replaced, the second character string to be replaced, Three target strings to be replaced, the 4th character string to be replaced replace with first object character string, the second target string respectively, no It is limited by number of characters, realizes many-one character string alternative patterns, without operation replacement one by one item by item;On the other hand, this method is grasped Make fast and easy, use scope is wider, and the replacement of a large amount of character strings, meets the needs of people suitable for text.
Embodiment six
Fig. 6 shows a kind of structure of character string alternative 600 of the offer of the embodiment of the present invention six, for the ease of saying It is bright, part related to the embodiment of the present invention is only shown.
Character string alternative 600, comprising: input unit 601, receiving unit 602 and replacement unit 603.
Input unit 601, for the character string replacement request in response to user, to user's output string typing page.
In embodiments of the present invention, input unit 601 is used for the character string replacement request in response to user, exports to user The character string typing page;Wherein, the character string typing page can be text box or other forms, including character string to be replaced with The input frame of target string is respectively used to input character string to be replaced and target word corresponding with the character string to be replaced Symbol string.
Receiving unit 602, for receive the first character string to be replaced that user inputted by the character string typing page, Second character string to be replaced, and first object word corresponding with the described first character string to be replaced and the second character string to be replaced Symbol string, first character string to be replaced and the second character string to be replaced are present in text.
In embodiments of the present invention, receiving unit 602 is for receiving what user was inputted by the character string typing page First character string to be replaced, the second character string to be replaced, and with the described first character string to be replaced and the second character to be replaced Go here and there corresponding first object character string, first character string to be replaced and the second character string to be replaced are present in text;The One character string to be replaced, the second character string to be replaced are present in text, can be word present in text or single The improper word of adjacent multiple characters composition in word or text, and to character number no requirement (NR);First object character string Equally can be arbitrary monocase or more for replacing the first character string to be replaced, the second character string to be replaced in text Character style.
Replacement unit 603 be used for by the text the first character string to be replaced and the second character string to be replaced replace For first object character string.
In embodiments of the present invention, replacement unit 603 is used for the first character string to be replaced and second in the text Character string to be replaced replaces with first object character string;By the first character string to be replaced in the text and second to be replaced Character string replaces with first object character string, comprising: such as by the first character string A to be replaced, the second character string B to be replaced, the Character A, B all in text are then replaced with character C by one target string C.
Character string alternative provided in an embodiment of the present invention, it is defeated by the character string typing page by receiving user First entered character string to be replaced, the second character string to be replaced, and it is to be replaced with the described first character string to be replaced and second The corresponding first object character string of character string, and by the first character string to be replaced and the second character string to be replaced in the text Replace with first object character string;It on the one hand, can be quickly equal by the first character string to be replaced and the second character string to be replaced First object character string is replaced with, is not limited by number of characters, many-one character string alternative patterns are realized, without operating one by one item by item Replacement;On the other hand, this method is easy to operate quick, and use scope is wider, the replacement of a large amount of character strings suitable for text, full The demand of sufficient people.
Embodiment seven
Fig. 7 shows a kind of structure of character string alternative 700 of the offer of the embodiment of the present invention seven, for the ease of saying It is bright, part related to the embodiment of the present invention is only shown, it is similar with embodiment six, the difference is that, further includes: it searches single Member 701 and reading unit 702.
Searching unit 701, it is the first character string to be replaced for being inputted with the character string typing page, second to be replaced Character string is querying condition, searches and obtain the position of the described first character string to be replaced, the second character string to be replaced in the text Confidence breath.
In embodiments of the present invention, what searching unit 701 was used to input with the character string typing page is first to be replaced Character string, the second character string to be replaced are querying condition, search in the text and obtain the described first character string to be replaced, second The location information of character string to be replaced;With the first character string to be replaced of character string typing page input, second to be replaced Character string is querying condition, searches and obtain the position of the described first character string to be replaced, the second character string to be replaced in the text Confidence breath, specifically includes: according to the first character string to be replaced, the second character string to be replaced of user's input, entire text is traversed, And obtain its position in the text, such as the first character string " A " to be replaced, the second character string " B " to be replaced be with A, B Querying condition traverses all characters in text " HIANDKIGAIJFDGBD ", obtains the position in the locating text of A, B difference, i.e. A In text the first row third, nine characters position, B is in the position of the 15th character of the first row in text.
Reading unit 702, the location information of the first character string to be replaced for being successively read in text, by the position First character string to be replaced of the corresponding position of information replaces with first object character string;It is to be replaced to be successively read in text second Second character string to be replaced of the corresponding position of the location information is replaced with first object character by the location information of character string String.
In embodiments of the present invention, the position for the first character string to be replaced that reading unit 702 is used to be successively read in text Confidence breath, replaces with first object character string for the first character string to be replaced of the corresponding position of the location information;Successively read The location information for taking the second character string to be replaced in text, by the second character string to be replaced of the corresponding position of the location information Replace with first object character string.Reading unit 702 can be also used for reading the first character string to be replaced in text, simultaneously The location information of two character strings to be replaced.
Character string alternative provided in an embodiment of the present invention, by inputted with the character string typing page first to Substitute character string, the second character string to be replaced are querying condition, search and obtain in the text the described first character string to be replaced, The location information of second character string to be replaced;The location information of first be successively read in text character string to be replaced, will be described First character string to be replaced of the corresponding position of location information replaces with first object character string, be successively read in text second to Second character string to be replaced of the corresponding position of the location information is replaced with first object by the location information of substitute character string Character string;The first character string to be replaced and the second character string to be replaced all in text accurately can be replaced with first Target string, easy to operate quick, use scope is wider, and the replacement of a large amount of character strings, meets people's suitable for text Demand.
The embodiment of the present invention also provides a kind of computer equipment, which includes processor, and processor is for holding The step of character string replacement method that above-mentioned each embodiment of the method provides is realized when the computer program stored in line storage.
Illustratively, computer program can be divided into one or more modules, one or more module is stored In memory, and by processor it executes, to complete the present invention.One or more modules, which can be, can complete specific function Series of computation machine program instruction section, the instruction segment is for describing implementation procedure of the computer program in computer installation.Example Such as, the computer program can be divided into the step of character string replacement method that above-mentioned each embodiment of the method provides.
It will be understood by those skilled in the art that the description of above-mentioned computer installation is only example, do not constitute to calculating The restriction of machine device may include component more more or fewer than foregoing description, perhaps combine certain components or different portions Part, such as may include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng the processor is the control centre of the computer installation, utilizes various interfaces and the entire user terminal of connection Various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization The various functions of computer installation.The memory can mainly include storing program area and storage data area, wherein storage program It area can application program (such as sound-playing function, image player function etc.) needed for storage program area, at least one function Deng;Storage data area, which can be stored, uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.In addition, Memory may include high-speed random access memory, can also include nonvolatile memory, such as hard disk, memory, grafting Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
If the integrated module/unit of the computer installation is realized in the form of SFU software functional unit and as independent Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program At the computer program can be stored in a computer readable storage medium, which is being executed by processor When, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, described Computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The meter Calculation machine readable medium may include: can carry the computer program code any entity or device, recording medium, USB flash disk, Mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included within the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.
In addition, it should be understood that although this specification is described in terms of embodiments, but not each embodiment is only wrapped Containing an independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should It considers the specification as a whole, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art The other embodiments being understood that.

Claims (10)

1. a kind of character string replacement method characterized by comprising
In response to the character string replacement request of user, to user's output string typing page;
The first character string to be replaced, the second character string to be replaced that user is inputted by the character string typing page are received, with And first object character string corresponding with the described first character string to be replaced and the second character string to be replaced, described first is to be replaced Character string and the second character string to be replaced are present in text;
By in the text the first character string to be replaced and the second character string to be replaced replace with first object character string.
2. the method according to claim 1, wherein by the first character string to be replaced and second in the text Character string to be replaced replaces with first object character string, comprising:
Using the first character string to be replaced of character string typing page input, the second character string to be replaced as querying condition, The location information of the described first character string to be replaced, the second character string to be replaced is searched and obtained in text;
The character string of the corresponding position of the location information is replaced with into first object character string.
3. according to the method described in claim 2, it is characterized in that, the character string of the corresponding position of the location information is replaced For first object character string, comprising:
The location information of first be successively read in text character string to be replaced, by the first of the corresponding position of the location information Character string to be replaced replaces with first object character string;It is successively read the location information of the second character string to be replaced in text, it will Second character string to be replaced of the corresponding position of the location information replaces with first object character string.
4. according to the method described in claim 2, it is characterized in that, the character string of the corresponding position of the location information is replaced For first object character string, comprising:
The location information for reading the first character string to be replaced in text, the second character string to be replaced simultaneously, the position is believed It ceases the first character string to be replaced of corresponding position and the second character string to be replaced while replacing with first object character string.
5. the method according to claim 1, wherein the reception user is defeated by the character string typing page First entered character string to be replaced, the second character string to be replaced, and it is to be replaced with the described first character string to be replaced and second The corresponding first object character string of character string, first character string to be replaced and the second character string to be replaced are present in text The step of, it specifically includes:
Receive the character string to be replaced of the first character string to be replaced, second that user inputted by the character string typing page, the Three character strings to be replaced, the 4th character string to be replaced, and with the described first character string to be replaced and the second character string to be replaced Corresponding first object character string, second target word corresponding with third character string to be replaced and the 4th character string to be replaced Symbol string, first character string to be replaced, the second character string, third character string to be replaced and the 4th character string to be replaced to be replaced It is present in text;
First character string to be replaced by the text and the second character string to be replaced replace with first object character The step of string, specifically includes:
By in the text the first character string to be replaced and the second character string to be replaced replace with first object character string;It will Third substitute character string, the 4th substitute character string replace with the second target string in the text.
6. a kind of character string alternative characterized by comprising
Input unit, for the character string replacement request in response to user, to user's output string typing page;
Receiving unit, for receive the first character string to be replaced, second that user inputted by the character string typing page to Substitute character string, and first object character string corresponding with the described first character string to be replaced and the second character string to be replaced, First character string to be replaced and the second character string to be replaced are present in text;
Replacement unit, for by the text the first character string to be replaced and the second character string to be replaced replace with first Target string.
7. device according to claim 6, which is characterized in that described device further include:
Searching unit, the first character string to be replaced, the second character string to be replaced for being inputted with the character string typing page For querying condition, the location information of the described first character string to be replaced, the second character string to be replaced is searched and obtained in the text.
8. device according to claim 6, which is characterized in that described device further include:
Reading unit, the location information of the first character string to be replaced for being successively read in text;Is successively read in text The location information of two character strings to be replaced;
Alternatively, being used for while reading the location information of the first character string to be replaced in text, the second character string to be replaced.
9. a kind of computer equipment, which is characterized in that the computer equipment includes processor, and the processor is deposited for executing It is realized when the computer program stored in reservoir such as the step of any one of claim 1-5 the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program It is realized when being executed by processor such as the step of any one of claim 1-5 the method.
CN201811023311.4A 2018-09-03 2018-09-03 A kind of character string replacement method, device, computer equipment and computer readable storage medium Withdrawn CN109241504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811023311.4A CN109241504A (en) 2018-09-03 2018-09-03 A kind of character string replacement method, device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811023311.4A CN109241504A (en) 2018-09-03 2018-09-03 A kind of character string replacement method, device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109241504A true CN109241504A (en) 2019-01-18

Family

ID=65060616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811023311.4A Withdrawn CN109241504A (en) 2018-09-03 2018-09-03 A kind of character string replacement method, device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109241504A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163241A (en) * 2019-03-18 2019-08-23 腾讯科技(深圳)有限公司 Data sample generation method, device, computer equipment and storage medium
CN110442843A (en) * 2019-06-25 2019-11-12 平安科技(深圳)有限公司 Character replacement method, system, computer equipment and computer readable storage medium
CN110728132A (en) * 2019-09-24 2020-01-24 北京奇艺世纪科技有限公司 Text data management method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163241A (en) * 2019-03-18 2019-08-23 腾讯科技(深圳)有限公司 Data sample generation method, device, computer equipment and storage medium
CN110163241B (en) * 2019-03-18 2022-12-30 腾讯科技(深圳)有限公司 Data sample generation method and device, computer equipment and storage medium
CN110442843A (en) * 2019-06-25 2019-11-12 平安科技(深圳)有限公司 Character replacement method, system, computer equipment and computer readable storage medium
WO2020258652A1 (en) * 2019-06-25 2020-12-30 平安科技(深圳)有限公司 Character replacement method and system, computer apparatus, and computer readable storage medium
CN110728132A (en) * 2019-09-24 2020-01-24 北京奇艺世纪科技有限公司 Text data management method and system

Similar Documents

Publication Publication Date Title
CN101990668B (en) Recommendation information generation apparatus and recommendation information generation method
US20120109946A1 (en) Determination of category information using multiple
CN109241504A (en) A kind of character string replacement method, device, computer equipment and computer readable storage medium
CN105224554A (en) Search word is recommended to carry out method, system, server and the intelligent terminal searched for
CN107911249A (en) Order line sending method, device and the equipment of a kind of network equipment
CN101984422A (en) Fault-tolerant text query method and equipment
CN105468222A (en) Application arrangement system and method
CN107766393A (en) Information processing method, client and server based on database
CN104750839A (en) Data recommendation method, terminal and server
CN107608583A (en) Using an exchange method, device, mobile terminal and computer-readable recording medium
CN106649210A (en) Data conversion method and device
CN103810204A (en) Information search method and information search device
CN109785867A (en) Double record process configuration methods, device, computer equipment and storage medium
US11361195B2 (en) Incremental update of a neighbor graph via an orthogonal transform based indexing
US8407255B1 (en) Method and apparatus for exploiting master-detail data relationships to enhance searching operations
CN105589873B (en) Data searching method, terminal and server
CN109902200A (en) A kind of method, apparatus and server of video search sequence
CN103336757A (en) Hardware protocol stack
CN107632752A (en) Display methods, device and the computer-readable recording medium of multi-medium data
CN103377246A (en) Bookmark processing method and terminal browser
CN104573132A (en) Method and device for finding songs
CN106844406B (en) Search method and search device
CN110278565A (en) A kind of base station design method and device
CN110471968A (en) Dissemination method, device, equipment and the storage medium of ETL task
CN109740130A (en) Method and apparatus for generating file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190118

WW01 Invention patent application withdrawn after publication