java - regex for even no. of single quotes -
I'm trying to find 'more', even after this. Quote of single (') and replace it with' OR ', I am trying to regex it in java, but there is no luck till now
for example company = Expected Output: Company = 'Sam' '' S & Joseph '' 'S' or Year = '1998', 'Sam' and 'Joseph' 'S' and Year = '1998' / Pre> Single quotes are not considered even within double quotes, while no number is counted for. Out of single quotes Then the above output will be retained in the first 'and' and will be replaced by the second place 'or'
. We can use the following regex (can only be calculated before ' "). \ Band \ b (?: (?: [^ '] * [^' ']') {2}) * [^ '] * $)
Comments
Post a Comment