Following my question about some search pattern in vim, I would like to get the the text corresponding to the first match (if any) of my search pattern wich includes cursor position and is multiline.
Here is a text example (markdown python cell):
```python
x = 10
```
```python
[p]rint(x)
```
the []
indicates cursor positon.
My search pattern:
\(```python\n\)\@<=\%(\%(```\)\@!\_.\)*\%#\_.\{-}\(```\)\@=
Wich corresponds to the text print(x)
.
So basically I would like to extract this text and save it into a variable in vimscript.
Thank you.
:help search()