-1

Suppose I have a sentence and it has 2 quoted texts.

Example:

My Name 'is xyz' and I work 'on servicenow'.

I want to get only "is xyz" not "on servicenow". It will be very helpful if any one tell me how to do this.

2 Answers2

3

'My Name "is xyz" and I work "on servicenow".'.split('"')[1]

pranavjindal999
  • 2,937
  • 2
  • 26
  • 35
0

Use split function

alert('My Name "is xyz" and I work "on servicenow".'.split('"')[1]);
shas
  • 703
  • 2
  • 8
  • 31