Not exactly 100% sure what you are after, but changing your expression to this: (?smi)(^\[1750256247\](.|-|\s*$))(^;Rev: B,5$)
(example here) works.
Some issues with your expression:
In regex syntax, the [
and ]
characters denote character sets, that is, a set of characters of which the engine will attempt to match one of. If you need to match the actual [
and ]
characters, you will need to escape them through the use of the \
character.
You are using the s
modifier, thus allowing the period character to also match newlines, but you are not using the period character.
EDIT: As per @stribizhev's suggestion, you can use (?smi)(^\[1750256247](.|-|\s*$))(^;Rev: B,5$)
. Personally I would go for the first option because I consider it more readable, but opinions will most likely differ on this.
`? – Wiktor Stribiżew Jan 15 '16 at 08:56