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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -