0
그래서 기본적인 아이디어는 내가 3 개 섹션, 설명 텍스트, HTML 코드 및 스크립트 코드에 다음을 분할 할 것입니다 :다음 정규식을 결합하는 방법은 무엇입니까?
---
name: Accordion
description: |
### What
Puts modules of content into a linear stack of panels that can be closed and opened independently of each other. The accordion also helps in shortening a page and making it more scannable.
### Use when
The content modules are mutually exclusive. Content modules can consist of a list of items, links or text blocks.
---
<!-- Accordion-->
<div class="ui-accordion">
some html
</div>
<!--/Accordion -->
<script>
some code
</script>
은 현재 내가 2 개 부분으로 분할 할 수있었습니다 만 그것은 또한 세 번째 부분에 있어야하는 스크립트 섹션을 포함합니다.
^(-{3}(?:\n|\r)([\w\W]+?)-{3})?([\w\W]*)
나는 이런 식하지만
나던 작업
^(-{3}(?:\n|\r)([\w\W]+?)-{3})?([\w\W]*)(<script.*?>([\s\S]*?)<\/script>)
어떤 제안을 시도?
### What
Puts modules of content into a linear stack of panels that can be closed and opened independently of each other. The accordion also helps in shortening a page and making it more scannable.
### Use when
The content modules are mutually exclusive. Content modules can consist of a list of items, links or text blocks.
<!-- Accordion-->
<div class="ui-accordion">
some html
</div>
<!--/Accordion -->
some code
그러나 3 개 그룹으로 분리 될 필요가있다 : 내가 필요
정확한 출력은 다음과 같다.
왜'<-/Accordion ->'을 사용하지 않습니까? –
예제 입력에서 원하는 정확한 출력을 포함하면 도움이됩니다. – forgivenson
정확한 출력 추가 –