I need to put one word and obtain the html tag with the word inclusive. Example:
- Text input: Madhuparna
I need to obtain:
June 5, 2021 By Madhuparna
bla bla bla Madhuparna bla bla bla
Test text:
<p>The entire purpose speed up the process.</p><p>June 5, 2021 By Madhuparna</p>\r\n<p>The entire purpose of a terminal emulator is to imitate how the regular computer terminals perform and allowing the main computer to connect to and use a remote computer through a command-line or a graphical interface. The terminal emulators are known to carry out the functions using the software.</p>\r\n<a>It allows file transfer between the main and the remote computer using SSH (Secure Shell) and also enables the host system to execute applications on the remote system. While it features a graphical user interface, programmers rather prefer the text-based interface to gain more control over all functions and speed up the process.</a><p>bla bla bla Madhuparna bla bla bla</p>
What I do for now but not work:
<(\S*?)[^>]*>.*?Madhuparna.*?<\/\1>|<.*?\/>
June 5, 2021 By Madhuparna
June 5, 2021 By Madhuparna