My pattern: \s^SID\d{3,}$\s
I want to allow any number of leading and trailing whitespaces, but it doesn't seem to work. What did I miss?
If you want whitespace to ALWAYS be there then:
^\s+SID\d{3,}\s+$
If you want whitespace to be OPTIONAL then:
^\s*SID\d{3,}\s*$
Note that if you put a plus after anything it means "1 or more" whereas an asterisk means "zero or more".
The \s
go after the beginning of line anchor and before the end of line anchor. After that, you need the *
quantifier.
^\s*SID\d{3,}\s*$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With