Is there a way I can search and replace for certain tags that contain other text.
e.g. HTML FILES have a <title> GOOSE DOG MONKEY </TITLE> tag.
I need to search and replace this for ANOTHER title tag. Obviously one cant search/replace for <title> because that still leaves the other portion of the sentence.
thanks
Searching in between text
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
I'm not sure exactly want you want to achieve.
You can search for entire elements including their beginning and ending tags (provided both tags are on the same line) with the regular expression
This will not work if a line may contain more than one element, as in
because the match will extend from the first beginning tag to the last ending tag. If the contained text does not contain any '<' characters, you can prevent this with
In WildEdit you can prevent such overlong matches more effectively with a non-greedy repeat:
With WildEdit you can also search for text that extends over variable numbers of lines.
You can search for entire elements including their beginning and ending tags (provided both tags are on the same line) with the regular expression
Code: Select all
<title>.*</title>
Code: Select all
one <title> GOOSE </title> element and another <title> MONKEY </title> element
Code: Select all
<title>[^<]*</title>
Code: Select all
<title>.*?</title>