How to extract html tags from a file using javascript regex.
I try with this regex /<.*>.*<\\/.*>/s
but it not give the expected result.
here is my source file
import { Component, Input, OnInit, ViewEncapsulation, Output,
EventEmitter } from '@angular/core';
@Component({
selector: 'mgmt-ui-input',
templateUrl: './ui-input.component.html',
styleUrls: ['./ui-input.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class UiInputComponent implements OnInit {
/**
* @example
* <mgmt-ui-input
* [showIconX]="true"
* [showIconV]="true"
* (close)="onClose($event)"
* >
* <input type="text">
* </mgmt-ui-input>
*
*
*
* show icon x
* @type {boolean}
*/
@Input() showIconX = true;
@Input() showIconV = true;
@Output() close = new EventEmitter<void>();
constructor() {
}
ngOnInit() {
}
}
here is the expected result from the regex
<mgmt-ui-input
[showIconX]="true"
[showIconV]="true"
(close)="onClose($event)"
>
<input type="text">
</mgmt-ui-input>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.