Ok so, in Sublime Text I can use this Find/Replace regex:
find: (src|href)="(assets\/.+?)"
replace: \1="{% static '\2' %}"
To replace this
<link href="assets/css/cssfile.css">
With this:
<link href="{% static 'assets/css/cssfile.css' %}"/>
When I use the same regexes in Pycharm, it doesn't replace the values correctly.. is it a regex problem or a Pycharm problem? I'm not sure since I'm kind of new to regular expressions.
As described in the PyCharm documentation, in PyCharm you need to use $1 rather than \1 to refer to a group in the replacement expression.