|
|
Browse by Tags
All Tags » regex » find replace
-
OK. Stick with me here. It is going to take me a few to explain this.
I am writing a small application in VB.NET. The ultimate task is to make a web browser, within a web browser. Basically, You open IE, FireFox, Safari, or whatever browser you like and go to the web application I am building. At the top of the web page, I have a tool bar, ...
-
Ok, so you will not be using groups. In that case you can use lookahead and lookbehind with this regular expression.
(?<=((<[^>]*>)[^<>/]*))(padding)(?=([^<>/]*(</[^>]*>)))
It will let you replace the word specified in the middle.
Brendan
-
Give this a shot.
(<[^>]*>)[^<>/]*(padding)[^<>/]*(</[^>]*>)
Same trick as before the middle group is what you want to replace each time. First and Third groups are the html tags around content. Any word you want to find can be put into that middle ...
|
|
|