Skip to Main Content

Java User Groups

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java regular expression to find string from which is not enclosed with in quotes (")

karthick.rajeJul 23 2021

Hi,
I am looking for a regular expression which finds from in the given string and ignore "~from"~ if it is enclosed with in Double quotes.

example:
this is sample "~from find~" from this example.
expression should ignore from in the string if it is enclosed within double quotes. and matches string which is not in quotes.

after matching I should be able to split the above string as
string 1 : this is sample "from find"
string2 : this example

Thanks

Comments

Post Details

Added on Jul 23 2021
0 comments
458 views