Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests (5)

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression
No Match

r"
"
i

Test String

Code Generator

Generated Code

# coding=utf8 # the above tag defines encoding for this document and is for Python 2.x compatibility import re regex = r"(52.\d{3}(-\d*)?)(\s?)((([\w\W]*\.)([\s\S]*)(\(End of (clause|provision)\)))|(\[Reserved\]))" test_str = ("52.250-3 SAFETY Act Block Designation/Certification. \n" "As prescribed in 50.206(b)(1), insert the following provision: \n" "SAFETY ACT BLOCK DESIGNATION/CERTIFICATION (FEB 2009) \n" "(a) Definitions. As used in this provision­\n" "“Act of terrorism” means any act determined to have met the following requirements or such other requirements as defined and specified by the Secretary of Homeland Security: \n" "(1) Is unlawful. \n" "(2) \n" "Causes harm,including financial harm,to a person,property, or entity, in the United States, or in the case of a domestic United States air carrier or a United States-flag vessel (or a vessel based principally in the United States on which United States income tax is paid and whose insurance coverage is subject to regulation in the United States), in or outside the United States. \n\n" "(3)\n" " Uses or attempts to use instrumentalities, weapons or other methods designed or intended to cause mass destruction, injury or other loss to citizens or institutions of the United States. “Block certification” means SAFETY Act certification of a technology class that the Department of Homeland Security (DHS) has determined to be anapproved class of approved productsforhomeland security. “Block designation” means SAFETY Act designation of a technology class that the DHS has determined to be a Qualified Anti-Terrorism Technology (QATT). \n\n\n" "“Qualified Anti-Terrorism Technology (QATT)” means any technology designed, developed, modified, procured, or sold for the purpose of preventing, detecting, identifying, or deterring acts of terrorism or limiting the harm such acts might otherwisecause, for which a SAFETY Act designation has been issued. Forpurposesof defining a QATT, technology means any product, equipment, service (including support services), device, or technology (including information technology) or any combination of the foregoing. Design services, consulting services, engineering services, software development services, software integration services, threat assessments, vulnerability studies, and other analyses relevant to homeland security may bedeemed a technology. \n" "“SAFETY Act certification” means a determination by DHS pursuant to 6U.S.C. 442(d), as further delineated in 6 CFR 25.9,that a QATTforwhich a SAFETY Act designation has been issued is an approved product for homelandsecurity, i.e., it will perform asintended, conforms to the seller’s specifications, and is safeforuse asintended. \n" "“SAFETY Act designation” means a determination by DHS pursuant to 6 U.S.C. 441(b) and 6 U.S.C. 443(a), as further delineated in 6 CFR 25.4,that a particularAnti-Terrorism Technology constitutes a QATT under the SAFETY Act. \n" "(b) \n" "The Support Anti-terrorism by Fostering EffectiveTechnologies Act of 2002 (SAFETY Act), 6 U.S.C. 441-444, creates certain liabilitylimitations for claims arising out of, relating to,or resulting from an act of terrorism where QATTs have been deployed. It also confers other important benefits. SAFETY Act designation and SAFETY Act certification are designed tosupport effectivetechnologies aimed at preventing, detecting,identifying,or deterring acts ofterrorism, or limiting the harm that such acts might otherwise cause, and which also meet other prescribed criteria. For some classes of technologies, DHS may issue a block designation/certification in order to lessen the burdens for filing for SAFETY Act designation or SAFETY Act certifications by not requiring applicants to provide certain information otherwise required and in order to offer expeditedreview of any application submitted pursuantto a block designation/certification. Block designations/certifications will be issued only for technologies that rely on established performance standards or defined technical characteristics. \n\n" "(c) (1) DHS has issued a block designation or block certification for the technology to be acquired under this solicitation. \n\n" "(2)\n" " This block designation or block certification is attached to this solicitation and contains essential information, including­\n\n" "(i)\n" " A detailed description of and specification for the technology covered by the block designation or block certification; \n\n" "(ii)\n" " A listing of those portions of the SAFETY Act application kit that must be completed and submitted by applicants; \n\n" "(iii) The date of its expiration; and \n" "(iv) Any other terms and conditions. \n\n" "(3) \n" "Offerorsshouldread this blockdesignation orblock certification carefully to make sure they comply withits terms if they plan to take advantage of SAFETY Act coverage for their technology(ies). \n\n" "(d)\n" " All determinations by DHS are based on factors set forth in the SAFETY Act and its implementing regulations. A determination by DHS to issue a SAFETY Act designation, or not to issue a SAFETY Act designation for a particular technology as a QATTis not a determination thatthe technology meets,or fails tomeet, the requirements of any solicitation issued by any Federal, State, local or tribal governments. Determinations by DHS with respect to whether to issue a SAFETY Act designation for technologies submitted for DHS review are based on the factors identified in 6 CFR 25.4(b). \n\n" "(e)\n" " Neither SAFETY Act designation nor certification is in any way a requirement of this action. Whether to seek thebenefits of the SAFETY Act for a proposed product or service isentirelyup to the offeror. Additionalinformation about the SAFETY Act and this block designation/certification may be found at the SAFETY Act website at http:// \n" "www.SAFETYAct.gov or requests may be mailed to: \n\n" "Directorate of Science and Technology SAFETY Act/Room 4320Department ofHomeland SecurityWashington, DC 20528 \n\n" "(f) \n" "Proposals inwhich pricingor any other termsor conditionsare offered contingent upon SAFETY Act designationor SAFETY Act certification of the proposed product(s) or service(s) will not be considered for award. \n\n\n" "(End of provision) \n" "Alternate I (Feb 2009). As prescribed in 50.206(b)(2), substitute the following paragraph (f): \n" "(f)(1) Offerors are authorized to submitproposalsmade contingent upon SAFETY Act designation(orSAFETY Act certification, if a block certification exists) before award. When anoffer is made contingent upon SAFETY Act designation or certification, the offeror also may submitan alternate offer withoutthe contingency. \n" "(2) If an offer is submittedcontingent upon receipt of SAFETY Act designation (or SAFETY Act certification, ifa block certification exists) prior to contract award, then the Government may not award a contract based on such offerunlessthe offeror demonstrates priorto award that DHS has issued a SAFETYActdesignation (or SAFETY Act certification, if a block certification exists) for theofferor’s technology. \n" "(3) The Government reserves therightto award the contract based on a noncontingent offer, prior to DHS resolution of the offeror’s application for SAFETY Act designation (or SAFETYActcertification, if ablock certification exists). \n" "Alternate II ( Feb 2009). As prescribed in 50.206(b)(3), substitute the following paragraph (f): \n" "(f)(1) Offerors are authorized to submitoffers presumingthat SAFETYActdesignation (or SAFETY Act certification, if a \n" "block certification exists) will be obtained before or after award. \n" "(2) An offeror is eligible for award only if the offeror­\n" "(i) Files a SAFETY Act designation (or SAFETY Act certification) application, limited to the scope of the applicable block designation (or block certification), within 15 days after submission of the proposal; \n" "(ii) Pursues its SAFETY Act designation (or SAFETY Act certification) application in good faith; and \n" "(iii) Agrees to obtain the amount of insurance DHSrequiresforissuing the offeror’s SAFETYActdesignation (or SAFETY Act certification). \n" "(3) If DHS has not issued a SAFETY Act designation (or SAFETY Act certification) tothe successful offerorbefore contract award, thecontracting officer will include theclause at 52.250-5 in the resulting contract. \n" "52.250-4SAFETY ActPre-qualification Designation Notice. \n" "As prescribed in 50.206(c)(1), insert the following provision: \n" "SAFETY ACT PRE-QUALIFICATION DESIGNATION NOTICE (FEB 2009) \n" "(a) Definitions. As used in this provision­\n" "“Act of terrorism” means any act determined to have met the following requirements or such other requirements as defined and specified by the Secretary of Homeland Security: \n" "(1) Is unlawful. \n" "(2) \n" "Causes harm,including financial harm,to a person,property, or entity, in the United States, or in the case of a domestic United States air carrier or a United States-flag vessel (or a vessel based principally in the United States on which United States income tax is paid and whose insurance coverage is subject to regulation in the United States), in or outside the United States. \n\n" "(3)\n" " Uses or attempts to use instrumentalities, weapons or other methods designed or intended to cause mass destruction, injury or other loss to citizens or institutions of the United States. “Block certification” means SAFETY Act certification of a technology class that the Department of Homeland Security (DHS) has determined to be anapproved class of approved productsforhomeland security. “Block designation” means SAFETY Act designation of a technology class that the DHS has determined to be a Qualified Anti-Terrorism Technology (QATT). \n\n\n" "“Pre-qualification designation notice” means a notice in a procurement solicitation or other publication by the Government stating that the technology to be procuredeither affirmativelyor presumptively satisfies the technicalcriteria necessary to be deemed aqualified anti-terrorism technology. A pre-qualificationdesignation notice authorizes offeror(s) to submit streamlined SAFETY Act applications for SAFETY Act designation and receive expedited processing of those applications. \n" "“Qualified Anti-Terrorism Technology (QATT)” means any technology designed, developed, modified, procured, or sold for the purpose of preventing, detecting, identifying, or deterring acts of terrorism or limiting the harm such acts might otherwisecause, for which a SAFETY Act designation has been issued. Forpurposesof defining a QATT, technology means any product, equipment, service (including support services), device, or technology (including information technology) or any combination of the foregoing. Design services, consulting services, engineering services, software development services, software integration services, threat assessments, vulnerability studies, and other analyses relevant to homeland security may bedeemed a technology. \n" "“SAFETY Act certification” means a determination by DHS pursuant to 6U.S.C. 442(d), as further delineated in 6 CFR 25.9,that a QATTforwhich a SAFETY Act designation has been issued is an approved product for homelandsecurity,i.e., it will perform asintended, conforms to the seller’s specifications, and is safeforuse asintended. \n" "“SAFETY Act designation” means a determination by DHS pursuant to 6 U.S.C. 441(b) and 6 U.S.C. 443(a), as further delineated in 6 CFR 25.4,that a particularAnti-Terrorism Technology constitutes a QATT under the SAFETY Act. \n" "(b) \n" "The Support Anti-terrorism by Fostering EffectiveTechnologies Act of 2002 (SAFETY Act), 6 U.S.C. 441-444, creates certain liabilitylimitations for claims arising out of, relating to,or resulting from an act of terrorism where QATTs have been deployed. It also confers other important benefits. SAFETY Act designation and SAFETY Act certification are designed tosupport effectivetechnologies aimed at preventing, detecting,identifying,or deterring acts ofterrorism, or limiting the harm that such acts might otherwise cause, and which also meet other prescribed criteria. \n\n" "(c) \n" "(1) DHS has issued a SAFETY Act pre-qualification designation notice for the technology to be acquired under this solicitation. \n\n\n" "(2) This notice is attached to this solicitation and contains essential information, including­\n" "(i)\n" " A detailed description of and specification for the technology covered by the notice; \n\n" "(ii)\n" " A statement that the technology described and specified in the notice satisfies the technical criteria to be deemed a QATTandthe offeror’s proposedtechnology either may presumptively or willqualify for the issuanceof adesignation provided theofferor complies with terms and conditions in the notice and itsapplication isapproved; \n\n\n" "(iii) The period of time within which DHS will take action upon submission of a SAFETY Act application submitted pursuant to the notice; \n" "(iv)\n" " A listing of those portions of the application that must be completed and submitted by selected awardees and the time periods for such submissions; \n\n" "(v)\n" " The date of expiration of the notice; and \n\n" "(vi)\n" " Any other terms and conditions concerning the notice. \n\n\n\n" "(3) \n" "Offerorsshouldread this notice carefullyto make sure they complywith the termsof the noticeif they planon taking advantage of SAFETY Act coverage for their technologies. \n\n" "(d)\n" " All determinations by DHS are based on factors set forth in the SAFETY Act and its implementing regulations. A determination by DHS to issue a SAFETY Act designation, or not to issue a SAFETY Act designation for a particular Technology as a QATTis not a determination thatthe Technology meets,or fails tomeet, the requirements of any solicitation issued by any Federal, State, local or tribal governments. Determinations by DHS with respect to whether to issue a SAFETY Act designation for Technologies submittedforDHS review are based on the factors identified in6 CFR 25.4(b). \n\n" "(e)\n" " Neither SAFETY Act designation nor certification is in any way a requirement of this action. Whether to seek the benefits of the SAFETY Act for a proposed product or service is entirely up to the offeror. Additional information about the SAFETY Act may be found at the SAFETY Act website at http://www.SAFETYAct.gov. \n\n" "(f) \n" "Proposals inwhich pricingor any other termsor conditionsare offered contingent upon SAFETY Act designationor certification of the proposed product(s) or service(s) will not be considered for award. \n\n\n" "(End of provision) \n" "Alternate I (Feb 2009). As prescribed in 50.206(c)(2), substitute the following paragraph (f): \n" "(f)(1) Offerors are authorized to submitproposalsmade contingent upon SAFETY Act designationbefore award. When anoffer is made contingent upon SAFETY Act designation, the offeror also may submitan alternate offer withoutthe contingency. \n" "(2) If an offer is submittedcontingent upon receipt of SAFETY Act designation priorto contract award, then the Government may notaward acontract based on suchoffer unless the offeror demonstrates priorto award that DHShas issued a SAFETY Act designation for theofferor’s technology. \n" "(3) The Government reserves therightto award the contract based on a noncontingent offer, prior to DHS resolution of \n" "theofferor’s application for SAFETY Act designation. Alternate II (Feb 2009). As prescribed in 50.206(c)(3), substitute the following paragraph (f): (f)(1) Offerors are authorized to submitproposalspresuming SAFETYActdesignation before or after award. \n" "(2) An offeror is eligible for award only if the offeror­\n" "(i)\n" " Files a SAFETY Act designation application, limited to the scope of the applicable prequalification designation notice, within 15 days after submission of the proposal; \n\n" "(ii) Pursues its SAFETY Act designation application in good faith; and \n" "(iii) Agrees to obtain the amount of insurance DHSrequiresforissuing the offeror’s SAFETYActdesignation. \n\n" "(3) \n" "If DHS has not issued a SAFETY Act designation tothe successful offerorbefore contract award, thecontracting officer willinclude the clauseat 52.250-5 in the resulting contract. \n\n\n" "52.250-5 SAFETY ActEquitable Adjustment. \n" "As prescribed in 50.206(d), insert the following clause: \n" "SAFETY ACT-EQUITABLE ADJUSTMENT (FEB 2009) \n" "(a) Definitions. As used in this clause­\n" "“Act of terrorism” means any act determined to have met the following requirements or such other requirements as defined and specified by the Secretary of Homeland Security: \n" "(1) Is unlawful. \n" "(2) \n" "Causes harm,including financial harm,to a person,property, or entity, in the United States, or in the case of a domestic United States air carrier or a United States-flag vessel (or a vessel based principally in the United States on which United States income tax is paid and whose insurance coverage is subject to regulation in the United States), in or outside the United States. \n\n" "(3)\n" " Uses or attempts to use instrumentalities, weapons or other methods designed or intended to cause mass destruction, injury or other loss to citizens or institutions of the United States. “Block certification” means SAFETY Act certification of a technology class that the Department of Homeland Security (DHS) has determined to be anapproved class of approved productsforhomeland security. “Block designation” means SAFETY Act designation of a technology class that the DHS has determined to be a Qualified Anti-Terrorism Technology (QATT). \n\n\n" "“Qualified Anti-Terrorism Technology (QATT)” means any technology designed, developed, modified, procured, or sold for the purpose of preventing, detecting, identifying, or deterring acts of terrorism or limiting the harm such acts might otherwisecause, for which a SAFETY Act designation has been issued. Forpurposesof defining a QATT, technology means any product, equipment, service (including support services), device, or technology (including information technology) or any combination of the foregoing. Design services, consulting services, engineering services, software development services, software integration services, threat assessments, vulnerability studies, and other analyses relevant to homeland security may bedeemed a technology. \n" "“SAFETY Act certification” means a determination by DHS pursuant to 6U.S.C. 442(d), as further delineated in 6 CFR 25.9,that a QATTforwhich a SAFETY Act designation has been issued is an approved product for homelandsecurity, i.e., it will perform as intended, conforms to the seller's specifications, and is safe for use as intended. \n" "“SAFETY Act designation” means a determination by DHS pursuant to 6 U.S.C. 441(b) and 6 U.S.C. 443(a), as further delineated in 6 CFR 25.4,that a particularAnti-Terrorism Technology constitutes a QATT under the SAFETY Act. \n" "(b)\n" " Prices for the items covered by the pre-qualification designation notice, block designation, or block certification in the contract were established presuming DHS will issue a SAFETY Act designation (or SAFETY Act certification) for those items. \n\n" "(c)\n" " In order to qualify for an equitable adjustment in accordance with paragraph (d) of this clause the Contractor shall in good faith pursue obtaining­\n\n" "(1)\n" " SAFETY Act designation (or SAFETY Act certification); and \n\n" "(2)\n" " The amount of insurance DHS requires for issuing any SAFETY Act designation (or SAFETY Act certification). \n\n\n\n" "(d) \n" "(1) If DHS denies the Contractor’s SAFETY Act designation (or certification) application, the Contractor may submit a request for anequitable adjustment within 30 days of DHS’s notificationof denial. \n\n" "(2) The Contracting Officer shall either­\n\n" "(i)\n" " Make an equitable adjustment to the contract price based on evidence of the resulting increase or decrease in the Contractor’scosts and/oran equitable adjustment to other terms and conditions based onlack of SAFETY Act designation (or certification); or \n\n" "(ii)\n" " At the sole option of the Government, terminate this contract for the convenience of the Government in place of an equitable adjustment. \n\n" "(3)\n" " A failure of the parties to agree on the equitable adjustment will be considered to be a dispute in accordance with the “Disputes” clause of this contract. \n\n" "(4)\n" " Unless first terminated, the Contractor shall continue contract performance during establishment of any equitable adjustment. \n\n\n" "(End of clause) \n" "52.251[Reserved] \n" "52.251-1Government Supply Sources. \n" "As prescribed in 51.107, insert the following clause: \n" "GOVERNMENT SUPPLY SOURCES (APR 2012) \n" "The Contracting Officer may issue the Contractor an authorization to useGovernmentsupplysources in the performance of this contract. Title toallpropertyacquired by theContractor under such an authorization shall vest in the Government unless otherwisespecified in the contract. The provisions of theclause at FAR 52.245-1, Government Property, apply to all property acquired under such authorization \n" "(End of clause) \n" "52.251-2Interagency Fleet Management SystemVehicles and RelatedServices. \n" "As prescribed in 51.205, insert the following clause: \n" "INTERAGENCY FLEET MANAGEMENT SYSTEM VEHICLES AND RELATED SERVICES (JAN 1991) \n" "The Contracting Officer may issue the Contractor an authorization to obtaininteragency fleet management system (IFMS) vehicles and related services for use in the performance of this contract. The use, service, and maintenance of interagency fleet management system vehicles and the use of related services by the Contractor shall be in accordance with 41 CFR 101-39 and 41 CFR 101-38.301-1. \n" "(End of clause) \n" "This page intentionally left blank. \n" "52.252[Reserved] \n" "52.252-1Solicitation Provisions Incorporated by Reference. \n" "As prescribed in 52.107(a), insert the following provision: \n" "SOLICITATION PROVISIONS INCORPORATED BY REFERENCE (FEB 1998) \n" "This solicitationincorporates one or more solicitation provisionsby reference, with the same force and effect as ifthey were givenin fulltext. Upon request, theContracting Officer will make their full text available. The offeror is cautioned that the listed provisions may include blocks that must be completed by the offeror and submitted with its quotation or offer. In lieu of submitting the full text of thoseprovisions, the offeror mayidentify the provision by paragraph identifier and provide the appropriate information withits quotation oroffer. Also, the full text of a solicitation provisionmay be accessed electronically at this/these address(es): \n" "_____________________________________________ [Insert one or more Internet addresses] \n" "(End of provision) \n" "52.252-2Clauses Incorporated by Reference. \n" "As prescribed in 52.107(b), insert the following clause: \n" "CLAUSES INCORPORATED BY REFERENCE (FEB 1998) \n" "This contract incorporates one or more clausesby reference, with the same force and effectas if theywere given infull text. Uponrequest,the Contracting Officerwill make their full text available. Also, the full text of a clause maybe accessed electronically at this/these address(es): \n" "_____________________________________________ [Insert one or more Internet addresses] \n" "(End of clause) \n" "52.252-3 Alterations in Solicitation. \n" "As prescribed in 52.107(c),insertthefollowingprovisioninsolicitationsinordertoreviseorsupplement,asnecessary, other parts of the solicitation thatapply to thesolicitation phaseonly, except for any provisionauthorized for usewith a deviation. Include clear identification of what is being- altered. \n" "ALTERATIONS IN SOLICITATION (APR 1984) \n" "Portions of this solicitation are altered as follows: \n" "(End of clause) \n" "52.252-4 Alterations in Contract. \n" "As prescribed in 52.107(d), insert the following clause in solicitations and contracts in order to revise or supplement, as necessary, other parts of thecontract, or parts of the solicitation that apply after contract award, except for any clause authorized for use with a deviation. Include clear identification of what is being altered. \n" "ALTERATIONS IN CONTRACT (APR 1984) \n" "Portions of this contract are altered as follows: \n" "(End of clause) \n" "52.252-5Authorized Deviations inProvisions. \n" "As prescribed in 52.107(e),insertthefollowingprovisioninsolicitationsthatincludeanyFARorsupplemental provisionwith an authorized deviation. Whenever any FAR or supplemental provisionis used with anauthorized deviation, thecontracting officer shall identify it by the same number, title, and date assigned tothe provisionwhen it is used without deviation, includeregulation name for any supplemental provision, except that the contracting officershallinsert “(DEVIATION)” after the date ofthe provision. \n" "AUTHORIZED DEVIATIONS IN PROVISIONS (APR 1984) \n" "(a)\n" " The use in this solicitation of any Federal Acquisition Regulation (48 CFR Chapter1) provision with an authorized deviation is indicated by theaddition of “(DEVIATION)” after the dateof the provision. \n\n" "(b)\n" " The use in this solicitation of any ______________ [insert regulation name] (48 CFR Chapter______) provision with anauthorized deviation isindicated bythe addition of “(DEVIATION)” after the name of theregulation. \n\n\n" "(End of clause) \n" "52.252-6 Authorized Deviations in Clauses. \n" "As prescribed in 52.107(f),insertthefollowingclauseinsolicitationsandcontractsthatincludeanyFARor supplemental clausewith an authorized deviation. Whenever any FAR or supplemental clause is usedwith an authorized deviation,the contracting officer shall identify it by the same number, title, and date assigned to theclause whenitis used without deviation, includeregulation name for any supplemental clause, except that the contracting officer shall insert “(DEVIATION)” after the date ofthe clause. \n" "AUTHORIZED DEVIATIONS IN CLAUSES (APR 1984) \n" "(a)\n" " The use in this solicitation or contract of any Federal Acquisition Regulation (48 CFR Chapter1) clause with an authorized deviation is indicated by the addition of “(DEVIATION)” after the date of theclause. \n\n" "(b)\n" " The use in this solicitation or contract of any _____. [insert regulation name] (48 CFR _____) clause with an authorized deviation is indicated by the addition of “(DEVIATION)” after the name of the regulation. \n\n\n" "(End of clause) \n" "52.253[Reserved] \n" "52.253-1 Computer Generated Forms. \n" "Asprescribed in FAR 53.111 \n" ", insert the following clause: \n" "COMPUTER GENERATED FORMS (JAN 1991) \n" "(a)\n" " Any data required to be submitted on a Standard or Optional Form prescribed by the Federal Acquisition Regulation (FAR) may be submitted on a computer generatedversionof the form, provided there is no change to the name, content, or sequence of the data elements on the form, and provided the form carries the Standard or Optional Form number and edition date. \n\n" "(b)\n" " Unless prohibited by agency regulations, any data required to be submitted on an agency unique form prescribed by an agency supplement to the FAR may be submitted on a computer generated version ofthe form provided there is no change to the name, content, or sequence of the data elements on the form and provided the form carries the agency form number and edition date. \n\n" "(c) \n" "If the Contractor submits a computer generated version ofa form thatis different than therequired form, thenthe rights and obligations of the parties will be determined based on the content of the required form. \n\n\n" "(End of clause) ") matches = re.search(regex, test_str, re.IGNORECASE) if matches: print ("Match was found at {start}-{end}: {match}".format(start = matches.start(), end = matches.end(), match = matches.group())) for groupNum in range(0, len(matches.groups())): groupNum = groupNum + 1 print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = matches.start(groupNum), end = matches.end(groupNum), group = matches.group(groupNum))) # Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html