Answer the question
In order to leave comments, you need to log in
How to trim string in django template?
{{ str|replace:'|/\..+/g|' }} I'm trying to cut a string after a dot
on regexr.com, the expression /\..+/g selects the text after the dot, however, as I understand it, something like (/\..+/g, '') is needed - tell me how it is in template correctly to write down?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question