-2

https://regex101.com/r/zAt2dw/3

I am seaching for lines like so

{"url":"/search?cflt=active&find_loc=37801","name":"Active Life"},

but as u can see in 101 example

{"url":"\/search\?cflt=[^<>]+?&amp;find_loc=37801","name":"[^<>]+?"},

match1 is huge and match 8 has 2 lines instead of 1

user41758
  • 309
  • 1
  • 2
  • 8

1 Answers1

0

You should use lazy quantifiers: +? instead of +.

andrey
  • 588
  • 1
  • 8
  • 14
  • i updated question please help – user41758 Jan 13 '19 at 19:24
  • Your regex matches more because of `[^<>]` parts. Try to exclude other symbols, which are not parts of the fields you are trying to match. For example, `[^\"<>]`. However by doing that you wouldn't find fields which have `"` in them, there may be some better strategy. – andrey Jan 13 '19 at 19:40