Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to edit the text:

appriskid = models.IntegerField(primary_key=True)
app_name = models.TextField()
identifier = models.CharField(max_length=150)
version = models.CharField(max_length=60, blank=True)



appriskid = None, app_name = None, identifier = None, version = None .......
share|improve this question
Do it in two steps: first replace everything on a line after a = by None, then merge the lines by searching for \n (extended syntax) and replacing it with ,. – Daniel Beck Aug 20 '12 at 9:35
Thank you, Could you tell me the regex strings to do that? – adii Aug 20 '12 at 9:46
up vote 0 down vote accepted

You can do that in 2 steps, as Daniel Beck suggested:

  1. Search Mode: Regular expression

    Find what: =.*

    Replace with: = None, ("None" + Comma + Space)

  2. Search Mode: Extended

    Find what: \r\n

    Replace with: (Empty)

share|improve this answer
Or you could do it in one step (=.*\r\n as the search term, replace with = None, ), assuming you are using Notepad++ version >= 6. They introduced PCRE, and multiline regex, in version 6 ( – Bob Aug 21 '12 at 8:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.