Performing multiple scope based search and replace within a document
AssigneeTata Consultancy Services Limited
InventorsTamildurai Mehalingam, Muthukumar Ezhumalai, Rekha Kothandaraman
Life of this patent
Estimating the term…
Abstract
A method and system for performing search and replace operation has been implemented. The system enables to perform multiple scope based search concurrently within plurality of documents. The system also supports multiple file formats and is able to generate reports post completion of the search and replace operation.
Claims14
A computer implemented method to perform a search and replace operation concurrently within a plurality of documents, the search and replace operation being subjected to a predefined scope and a condition file, the method comprising:
- selecting at least one document from amongst the plurality of documents to perform the search and replace operation;
- deriving the condition file from the at least one document, the condition file comprising a set of search and ignore conditions;
- specifying a plurality of search positions within the at least one document, each search position adapted to limit the traversal of the search operation within the at least one document for a predefined position;
- caching each of the search positions and data located therein in a dynamic memory, wherein the dynamic memory is coupled to a controller;
- identifying and replacing a first pattern in the at least one document with a second pattern based upon the cached data, wherein the second pattern is identified by inserting at least one configurable warning tag for each search position, and wherein the at least one configurable warning tag notifies changes in the lines in the condition file based on the replaced first pattern;
- and
- generating at least one search and replacement report in a consolidated form illustrating a set of changes occurred post the replacing of the first pattern in the at least one document with the second pattern based upon the cached data.
A search and replace system embedded in a non-transitory computer-readable storage medium to perform multiple scope based search and replace operations concurrently within a plurality of documents, the system comprising:
- an input module coupled to a scanner for identifying first pattern to be searched and second pattern to be replaced within at least one document from amongst a plurality of documents;
- an ignore block finder and a scope detector for processing the at least one document, wherein the ignore block finder is communicatively coupled to a controller and configured to check search and ignore conditions in a condition file to be used by the scope detector for defining a first pattern to be searched within the at least one document for replacement, and wherein the scope detector is linked to the controller and adapted to gather cached data from at least one document specifying one or more conditions for the first pattern to be searched and replaced with a second pattern based upon cached data, wherein the second pattern is identified by inserting at least one configurable warning tag for each search position, and wherein the at least one configurable warning tag notifies the changes in the lines in the condition file based on the replaced first pattern;
- a replacing module configured to replace the cached data as per the condition file;
- and
- a reporting module to generate a consolidated report illustrating changes occurred post the replacing the first pattern in the at least one document with the second pattern based upon the cached data.
Dependencies are inferred from the claim text.