- In the "Find" field, enter the regular expression: ^.LocalizedType:.$ (This will remove 'LocalizedType:' and everything after it on each line in the file.)
- Leave the "Replace" field empty.
- Make sure the "Regular expression" option is checked.
- Click "Replace All".
Do regular expressions work?
Do regular expressions work?
I've got version 3.1.00 in Replace this is what I did:
Re: Do regular expressions work?
It will not — mainly because of your incorrect use of the wildcard.
Does it have some option that you set where the ^ and $ anchor tokens are relative to individual lines? If not, then it would only match once in the whole file.
And your pattern is not correct anyway, which is why it is not found even once in the file. You seem to think that . is a wildcard that matches any number of characters. It does not. It matches exactly one character. To have it match any number of characters (zero or more), then you would need to add the * quantifier to make it .*. Without that, you are saying that it needs to be preceded by exactly one character after the start of the haystack and followed by exactly one character between it and the end of the haystack. And again, unless there is some special setting for it, the haystack is the entire file, not an individual line. You can accomplish what you are attempting by using \V instead of . to match non-line break characters (still with a * quantifier).
Who is online
Users browsing this forum: No registered users and 6 guests