Regext Statement Needed

I want Regex statement for input
3.1 Active Part
An active part is one currently supplied to the customer for original equipment or service applications.
The part remains active until tooling scrap authorization is given by the appropriate customer activity.
For parts with no customer-owned tooling or situations where multiple parts are made from the same
tool, written confirmation from Ford Engineering and the Buyer is required to deactivate a part.
NOTE: For bulk material, “active part” refers to the bulk material contracted, not the parts that are
subsequently produced from that material.
3.2 Aftermarket Parts
Replacement parts not procured or released by Ford Motor Company for service part applications
that may not be produced to original equipment specifications.
3.3 APPC
Average Purchased Part Capacity: The organization’s capacity commitment (in part count per week)
to meet the Average Production Weekly capacity requirement and recorded in Ford’s capacity
planning systems Global Capacity Planning (GCP) or Manufacturing Capacity Planning Volume
(MCPV).
3.4 Average Production Weekly (APW)
Average Production Weekly; capacity requirement for sustained production based on a 5 day work
week. Organizations: see the Capacity Planning Web Guide available through

And want Output for 3.1
An active part is one currently supplied to the customer for original equipment or service applications.
The part remains active until tooling scrap authorization is given by the appropriate customer activity.
For parts with no customer-owned tooling or situations where multiple parts are made from the same
tool, written confirmation from Ford Engineering and the Buyer is required to deactivate a part.
NOTE: For bulk material, “active part” refers to the bulk material contracted, not the parts that are
subsequently produced from that material.
For 3.2
Replacement parts not procured or released by Ford Motor Company for service part applications
that may not be produced to original equipment specifications.
As Following
Please help

@Kuldeep_Pandey

Let us know the expected output!

For 3.1 Output
An active part is one currently supplied to the customer for original equipment or service applications.
The part remains active until tooling scrap authorization is given by the appropriate customer activity.
For parts with no customer-owned tooling or situations where multiple parts are made from the same
tool, written confirmation from Ford Engineering and the Buyer is required to deactivate a part.
NOTE: For bulk material, “active part” refers to the bulk material contracted, not the parts that are
subsequently produced from that material.
For 3.2 Output
Replacement parts not procured or released by Ford Motor Company for service part applications
that may not be produced to original equipment specifications.
For 3.3 Output
Average Purchased Part Capacity: The organization’s capacity commitment (in part count per week)
to meet the Average Production Weekly capacity requirement and recorded in Ford’s capacity
planning systems Global Capacity Planning (GCP) or Manufacturing Capacity Planning Volume
(MCPV).

Have a look here:

And handling the end of file:

Take 3.1 , 3.2 , 3.3 as Dynamic variable and give me whole statement

Hi @Kuldeep_Pandey ,

Along with the mentioned Regex Expression, maybe we can Anchor only to the Beginning and make the Next Para Number Pattern as the End of line.

(?<=^3.1)[\S\s]+?(?=^\d+\.\d+)

When using it in Studio by Expression it can be made dynamic by just replacing the 3.1 with the variable like below :

Regex.Match(yourInputString,"(?<=^"+ParaNumber+")[\S\s]+?(?=^\d+\.\d+)").Value.ToString

Here, ParaNumber is a string variable, where you can assign the values 3.1 or 3.2 or 3.3 etc. accordingly as needed.

Let us know if the above doesn’t work.

@Kuldeep_Pandey

Check these once.

System.Text.RegularExpressions.Regex.Match(Dtr,"(?<=\d\D\d\s\w.*\n)[\s\S]+?(?=\d\D)").Tostring.Trim

Duplicate topic : PDF Search Automation

Not Giving any Output , showing blank

@Kuldeep_Pandey ,

Apologies. We need to add the RegexOption MultiLine like below :

Regex.Match(strInput,"(?<=^"+ParaNumber+")[\S\s]+?(?=^\d+\.\d+)",RegexOptions.Multiline).Value.ToString

Let us know if you are still unable to get the required output.

Thanks Is there any method to take same format text like if Bold text written as bold and normal text comes as normal in output

@Kuldeep_Pandey ,

I believe using the regex, we will not be able to perform that formatting. But we would need to understand what is it that you actually required to perform and what is the output format expected ? Text file ? Word Document ?

Also, as this latest topic is a wide topic, we do ask you to create a Separate Topic on the same, So more concentrated help can be provided on it.

Ok Thankyou

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.