A system comprising: a decoder to: receive an input data corresponding to a programming language; and convert the input data into a plurality of embeddings, wherein each embedding corresponds to a vector based representation of an attribute corresponding to the input data; a processor including an artificial intelligence, "AI", engine to generate an optimized regular expression based on at least one of the type of the programming language and a corresponding library in the database, the processor comprising: a regular expression, "Regex", optimizer to: receive a generated regular expression corresponding to the plurality of embeddings, wherein the generated regular expression is at least one of an existing regular expression from a database and a newly generated regular expression from a regex generator associated with the processor; parse the generated regular expression into a plurality of sub-blocks; classify, using a neural network based classifier associated with the AI engine, the plurality of sub-blocks to obtain a plurality of classified sub-blocks; evaluate, using the neural network based classifier, a quantifier class for each classified sub-block to identify a corresponding computationally expensive class; perform, using a reinforcement learning based deep neural network associated with the AI engine, an iterative analysis to obtain a plurality of optimized sub-blocks associated with a minimum computation time, wherein the iterative analysis comprises replacing the quantifier class with a substitute class and performing iterative computation cycles to evaluate the corresponding computation time with respect to the substitute class; and combine the plurality of optimized sub-blocks to obtain the optimized regular expression. a decoder to: receive an input data corresponding to a programming language; and convert the input data into a plurality of embeddings, wherein each embedding corresponds to a vector based representation of an attribute corresponding to the input data; receive an input data corresponding to a programming language; and convert the input data into a plurality of embeddings, wherein each embedding corresponds to a vector based representation of an attribute corresponding to the input data; a processor including an artificial intelligence, "AI", engine to generate an optimized regular expression based on at least one of the type of the programming language and a corresponding library in the database, the processor comprising: a regular expression, "Regex", optimizer to: receive a generated regular expression corresponding to the plurality of embeddings, wherein the generated regular expression is at least one of an existing regular expression from a database and a newly generated regular expression from a regex generator associated with the processor; parse the generated regular expression into a plurality of sub-blocks; classify, using a neural network based classifier associated with the AI engine, the plurality of sub-blocks to obtain a plurality of classified sub-blocks; evaluate, using the neural network based classifier, a quantifier class for each classified sub-block to identify a corresponding computationally expensive class; perform, using a reinforcement learning based deep neural network associated with the AI engine, an iterative analysis to obtain a plurality of optimized sub-blocks associated with a minimum computation time, wherein the iterative analysis comprises replacing the quantifier class with a substitute class and performing iterative computation cycles to evaluate the corresponding computation time with respect to the substitute class; and combine the plurality of optimized sub-blocks to obtain the optimized regular expression. receive a generated regular expression corresponding to the plurality of embeddings, wherein the generated regular expression is at least one of an existing regular expression from a database and a newly generated regular expression from a regex generator associated with the processor; parse the generated regular expression into a plurality of sub-blocks; classify, using a neural network based classifier associated with the AI engine, the plurality of sub-blocks to obtain a plurality of classified sub-blocks; evaluate, using the neural network based classifier, a quantifier class for each classified sub-block to identify a corresponding computationally expensive class; perform, using a reinforcement learning based deep neural network associated with the AI engine, an iterative analysis to obtain a plurality of optimized sub-blocks associated with a minimum computation time, wherein the iterative analysis comprises replacing the quantifier class with a substitute class and performing iterative computation cycles to evaluate the corresponding computation time with respect to the substitute class; and combine the plurality of optimized sub-blocks to obtain the optimized regular expression.