IP Library Granted Patent US 12,619,403
Granted Patent B2
US 12,619,403 · App. 17/717,592 · Granted May 5, 2026

Regular expression processor

Inventors: John Hurley (Belfast, GB); Xiaolin Cao (Newtownabbey, GB); Rafiullah Khan (Belfast, GB)
Assignee: NVIDIA Corporation
G06F8/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,619,403
App. No.
17/717,592
Filed
Apr 11, 2022
Granted
May 5, 2026
Kind
B2
Examiner
VO, TED T
Art Unit
2191
USPC
717/136
Abstract

Apparatuses, systems, and techniques to process regular expressions. In at least one embodiment, a regular expression that includes at least one zero-length assert is refactored and processed as an equivalent plurality of regular expressions that do not contain zero-length asserts.

Claims (59)

1 . A non-transitory machine-readable medium having stored thereon a set of instructions, which if performed by one or more processors, cause the one or more processors to at least:

obtain source code describing a first regular expression with a zero-length assert;

determine a second regular expression that represents a condition associated with the zero-length assert;

determine a third regular expression based at least in part on the first regular expression without the zero-length assert;

generate processor-executable instructions to evaluate the second regular expression and the third regular expression, wherein the processor-executable instructions comprise an order of execution to perform the second regular expression and the third regular expression to generate a result corresponding to the first regular expression;

modify the source code to replace the first regular expression with the zero-length assert with the instructions generated to evaluate the second regular expression and the third regular expression; and

compile the modified source code without the first regular expression with the zero-length assert.

2 . The non-transitory machine-readable medium of claim 1 , wherein:

the zero-length assert is a look-behind assert; and

the third regular expression includes a portion of a match pattern of the zero-length assert followed by a portion of the first regular expression that follows the zero-length assert.

3 . The non-transitory machine-readable medium of claim 1 , wherein:

the zero-length assert is a look-ahead assert; and

the third regular expression includes a portion of the first regular expression that occurs before the zero-length assert followed by a portion of a match pattern of the zero-length assert.

4 . The non-transitory machine-readable medium of claim 1 , wherein the order of execution indicated by the processor-executable instructions to evaluate the second regular expression and the third regular expression comprises logic that causes the second regular expression and the third regular expression to be evaluated in parallel.

5 . The non-transitory machine-readable medium of claim 1 , wherein the processor-executable instructions to evaluate the second regular expression and the third regular expression allow the second regular expression and the third regular expression to be evaluated for a character sequence without retrieving the character sequence more than once.

6 . The non-transitory machine-readable medium of claim 1 , wherein the order of execution indicated by the processor-executable instructions further comprises a set of Boolean logic usable to combine a first result produced by evaluating the second regular expression and a second result produced by evaluating the third regular expression.

7 . The non-transitory machine-readable medium of claim 1 , wherein the source code is text data stored in a file on computer-readable media.

8 . The non-transitory machine-readable medium of claim 1 , wherein:

the first regular expression includes a plurality of zero-length asserts; and

the set of instructions further cause the one or more processors to determine and generate one or more fourth regular expressions that does do not include an assert for each zero-length assert of the plurality of asserts, wherein the processor-executable instructions further comprise additional logic indicating an order of execution to perform the one or more fourth regular expressions and generate the result corresponding to the first regular expression.

9 . A computer-implemented method comprising:

obtaining source code describing a first regular expression with a zero-length assert;

obtaining a first result of evaluating a second regular expression and a second result of evaluating a third regular expression, the second regular expression and the third regular expression generated from a first regular expression that includes a zero-length assert;

combining the first result and the second result to produce a third result for the third regular expression, the combination based at least in part on processor-executable instructions that indicate an order of execution to perform the second regular expression and the third regular expression to generate a result corresponding to the first regular expression that represents a value associated with the zero-length assert; and

modifying the source code to replace the first regular expression that includes the zero-length assert with the instructions to obtain the first result and the second result and to combine the first result and result to produce the third result; and

compiling the modified source code without the first regular expression that includes the zero-length assert.

10 . The computer-implemented method of claim 9 , wherein:

the zero-length assert is a look-behind assert; and

the third regular expression includes a portion of a match pattern of the zero-length assert followed by a portion of the first regular expression that follows the zero-length assert.

11 . The computer-implemented method of claim 9 , wherein:

the zero-length assert is a look-ahead assert; and

the third regular expression includes a portion of the first regular expression that occurs before the zero-length assert followed by a portion of a match pattern of the zero-length assert.

12 . The computer-implemented method of claim 9 ,

wherein the processor-executable instructions indicate the order of execution comprises the first regular expression and the second regular expression being evaluated in parallel.

13 . The computer-implemented method of claim 9 , wherein the processor-executable instructions indicate the third regular expression and the second regular expression are evaluated for a character sequence without reading the character sequence more than once.

14 . The computer-implemented method of claim 9 , wherein the first result and the second result are binary values that are combined using logic indicated by the processor-executable instructions to produce the third result.

15 . The computer-implemented method of claim 9 , wherein the second regular expression and the third regular expression are evaluated using source data obtained over a computer network.

16 . The computer-implemented method of claim 9 , further comprising evaluating one or more fourth regular expressions for each zero-length assert in the first regular expression.

17 . A system comprising one or more circuits to:

obtain source code describing a first regular expression with a zero-length assert;

identify a second regular expression that represents a condition associated with the zero-length assert;

identify a third regular expression based at least in part on the first regular expression without the zero-length assert;

evaluate the second regular expression to produce a first result;

at least partly in parallel with the evaluation of the second regular expression, evaluate the third regular expression to produce a second result; and

use the first result and the second result to determine a value of the first regular expression, according to processor-executable instructions that indicate an order of execution to perform the second regular expression and the third regular expression and combine the first result and the second result to generate the value corresponding to the first regular expression;

modify the source code to replace the first regular expression with the zero-length assert with the instructions to obtain the first result and the second result and to combine the first result and result to produce the third result; and

compile the modified source code without the first regular expression with the zero-length assert.

18 . The system of claim 17 , wherein the system provides the first result and the second result in association with an identifier of the first regular expression.

19 . The system of claim 17 , wherein:

the zero-length assert is a look-behind assert; and

the third regular expression includes a portion of a match pattern of the zero-length assert followed by a portion of the third regular expression that follows the zero-length assert.

20 . The system of claim 17 , wherein:

the zero-length assert is a look-ahead assert; and

the third regular expression includes a portion of the first regular expression that occurs before the zero-length assert followed by a portion of a match pattern of the zero-length assert.

21 . The system of claim 17 , wherein the third regular expression and the second regular expression are evaluated for a character sequence without retrieving the character sequence more than once.

22 . The system of claim 17 , wherein the value of the first regular expression is determined by combining the first result and the second result with Boolean logic.

23 . The system of claim 17 , wherein:

the first regular expression includes a plurality of asserts; and

the system evaluates an one or more fourth regular expressions for each assert of the plurality of asserts, wherein the one or more fourth regular expressions are assert-less and the processor-executable instructions further comprise additional logic indicating an order of execution to perform the one or more fourth regular expressions and generate the result corresponding to the first regular expression.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 11, 2022
From: HURLEY, JOHN; CAO, XIAOLIN; KHAN, RAFIULLAH
To: NVIDIA CORPORATION
Reel/Frame 059561/0885 →
Continuity (1)
Related Publication 20230325157A1 · Oct 12, 2023
References Cited (10)
US 6785677B1 · Fritchman · 2004 [cited by examiner]
US 8250080B1 · Guha · 2012 [cited by examiner]
US 11263247B2 · Malak · 2022 [cited by examiner]
US 11269934B2 · Malak · 2022 [cited by examiner]
US 11354305B2 · Malak · 2022 [cited by examiner]
US 11580166B2 · Malak · 2023 [cited by examiner]
US 20180113890A1 · Raza · 2018 [cited by examiner]
Bispo et al., “Regular Expression Matching for Reconfigurable Packet Inspection”, 2006, IEEE, pp. 119-126. (Year: 2006). [cited by examiner]
Zsolt Nagy, “Regex Quick Syntax Reference: Understanding and Using Regular Expressions” 2018, Apress, 156 pages. (Year: 2018). [cited by examiner]
IEEE, “IEEE Standard 754-2008 (Revision of IEEE Standard 754-1985): IEEE Standard for Floating-Point Arithmetic,” Aug. 29, 2008, 70 pages. [cited by applicant]