Skip to Main Content

Java User Groups

Announcement

Testing banner

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
47 views