0

Sample input:

RegExr was created by gskinner.com, and is proudly hosted by Media Temple. foo("text1" + getStr()) ; foo('text2') ;

var test = "text1; Edit the Expression & Text to see matches. Roll over matches or the expression for details. PCRE & Javascript flavors of RegEx are supported.

foo('text3')

The side bar includes a Cheatsheet, full Reference, and Help. You can also Save & Share with the Community, and view patterns you create or favorite in My Patterns.

Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain describes your expression in plain English.

I want to get string between foo(" and "). I found foo("*") using below regex.

/(foo\(.+\))/g

I couldn't exclude foo(" and ") (also foo(' ')).

How can I do that?

regex img

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
zakjma
  • 2,030
  • 12
  • 40
  • 81

0 Answers0