2

I looked on How to match "anything up until this sequence of characters" in a regular expression?

But this is not my case I need to get everything inside (code) and () Example

```code
this is i want to get
this is too
```

I tried this regex

```.+\s*(.+)\s*```

But it doesn't work with multiple line data. What should I do to make it work?

Community
  • 1
  • 1
ivan
  • 287
  • 3
  • 14

1 Answers1

2
```[\s\S]*?```

You can simply use this.Or you can use your regex with s or DOTALL flag

vks
  • 67,027
  • 10
  • 91
  • 124