Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

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.