EmEditor (text editor) Forum Index Regular Expressions
How to extract only one tag from the html file using regular expression? | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| Stefan | Posted on: 7/12/2011 12:34 pm |
Home away from home ![]() ![]() Joined: 7/14/2008 From: Germany, EU Posts: 261 |
Re: How to extract only one tag from the html file using regular expression? I don't know if i do it the elegant way, but at least it works:
Example text: <a href="https://XXXoneXX/en/XXXXX"> <a href="https://XXtwoXXX/de/XXXXX"> <a href="https://XXXthreeXX/es/XXXXX"> <a href="https://XfourXX/en/XXXXX"> <a href="https://XXfiveXXX/de/XXXXX"> <a href="https://XXsixXXX/us/XXXXX"> <a href="https://XsevenXX/it/XXXXX"> <a href="https://XeightXX/tc/XXXXX"> <a href="https://XnineXX/en/XXXXX"> Result: 1: <a href="https://XXXoneXX/en/XXXXX"> 4: <a href="https://XfourXX/en/XXXXX"> 6: <a href="https://XXsixXXX/us/XXXXX"> 9: <a href="https://XnineXX/en/XXXXX"> RegEx used to match wanted line: "<a href=.https.+/(en|us)/.+>" Script: HTH? --- @Emura But i don't understand why the function didn't return something with the function name? I think this should work: but i have to use something like: 10.1.0, 32-bit portable on XP 32 SP3 |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| |
raviniral | 6/18/2011 6:46 am |
| » |
Stefan | 7/12/2011 12:34 pm |
| Register To Post | |


