regex - Find a line with leading and/or trailing space(s) -
create regular expression find line leading and/or trailing space(s).
guys, have no idea how start. care lighten me up?
to see if such lines exist, can use simple regex (see online demo):
^ | $
to match lines, use (see online demo):
^(?: .*$|.* $)
to match spaces, use (see online demo):
^ +| +$
Comments
Post a Comment