Forum Stats

  • 3,750,406 Users
  • 2,250,174 Discussions
  • 7,866,970 Comments

Discussions

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

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

Tagged: