Free Support Forum - aspose.com

Unmatched closing ')' near index 373

when i give this text in pattern it’s gives exception.
Pattern newRegex = Pattern.compile(“The parties shall comply with all applicable laws and regulations governing the privacy and security of patient information, including, but not limited to, the GDPR Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data), as applicable, and any other laws, rules, or regulations relating to the processing of personal data, the maintenance, the use, the transmission or other activity concerning patient records and the confidentiality of personal and medical data”, Pattern.CASE_INSENSITIVE);

The exception is like ,

Exception in thread “main” java.util.regex.PatternSyntaxException: Unmatched closing ‘)’ near index 373
The parties shall comply with all applicable laws and regulations governing the privacy and security of patient information, including, but not limited to, the GDPR Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data), as applicable, and any other laws, rules, or regulations relating to the processing of personal data, the maintenance, the use, the transmission or other activity concerning patient records and the confidentiality of personal and medical data
^
at java.util.regex.Pattern.error(Pattern.java:1957)
at java.util.regex.Pattern.compile(Pattern.java:1702)
at java.util.regex.Pattern.(Pattern.java:1351)
at java.util.regex.Pattern.compile(Pattern.java:1054)
at FindAndHighlightText.main(FindAndHighlightText.java:56)

@rabin.samanta

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a simple Java application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.