regex - Regular expression for certain amount of characters -
I am trying to change many URLs with TextWrangler, which is I have tried but it does not work ... What is the solution? change mean: Example m.htm
m should be lost, but only the total number of characters in the file name is 7. People with fewer characters should not be changed.
/.*? {7} m.htm /
href = "([^"] *) Meaning:
href = " after any non
" character until a
/ (better than the latest: greedy) then 6 characters after a
m , then any
" The character is not
href = "1 \ / \ 2.htm \ 3"
\ 1 = [^ "] * \ 2 = {6} \ 3 = [^ "] *
& lt; a href =" google.com/foo/bar/urzadjm. If the files can be
htm and
php , then I recommend to replace
.htm with
(.htm | .php) ) (Warning to change the context behind the numbers!)
Comments
Post a Comment