I have a String like - \"Bangalore,India=Karnataka\". From this String I would like to extract only the substring \"Bangalore\". In this case the regex
\"Bangalore,India=Karnataka\"
\"Bangalore\"
If you are only interested to check that "Bangalore" is contained in the string then you don't need a regexp for this.
Python:
In [1]: s = 'Bangalorejkdjiefjiojhdu' In [2]: 'Bangalore' in s Out[2]: True