mercredi 5 décembre 2018

Powershell matching: How do I search in a document all text except one word

I am searching a XML like string in a text. should be somthing like: &ls;span class="Translation"> TEXT I AM INTERESTED IN &ls;span> I tried this one out: $content -match '(span class="tlid-translation translation">)(\s*)(.*?)()'

Works fine, but as soon as my text contains a dot '.' it may work or may not work. Seems to depend on the position of the moon also. Any ideas? In perl I would search a string start with span then (a group of all characters which do not contain the word span) I searched, but I do not find an example which searches a string which does not contain a certain word.

Thx a lot

Aucun commentaire:

Enregistrer un commentaire