1

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)
                .

                . 
                .   

to:

appriskid = None, app_name = None, identifier = None, version = None .......
2
  • 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, 2012 at 9:35
  • Thank you, Could you tell me the regex strings to do that?
    – adii
    Aug 20, 2012 at 9:46

1 Answer 1

0

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)

1
  • 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 (notepad-plus-plus.org/news/notepad-6.0-release.html).
    – Bob
    Aug 21, 2012 at 8:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .