Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer peopleโ€™s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer peopleโ€™s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3300728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:41:16+00:00 2026-05-17T20:41:16+00:00

I am curently busy with bulding a synthax document in SPSS and have a

  • 0

I am curently busy with bulding a synthax document in SPSS and have a column of variable strings that consists of approximately 40 lines (it will be much much more in coming week). SPSS has a nice way of creating it (can be seen here ๐Ÿ™‚
http://vault.hanover.edu/~altermattw/methods/stats/reliable/reliability-1.html) but it can be done per one variable at a time which is possible to automatize.

I am a total beginner (I wouldn’t mind if you would call me n00b) at search&replace with reqular expressions in notepad++ but I can use the extended search function as a basic user ๐Ÿ˜›

The data contains scores Likert scale (from 1-7) and I would like to reverse it to do some tests.

For example: my variable name on the line is q_4_SQ001 and the sline in synthax editor is q_4_SQ001=COMPUTE q_4_SQ001r=8-q_4_SQ001.

My question so far is thus:

How can I convert a line containing a unique variable name into it’s revers formula?

So in this case, how can I replace the following lines:

q_4_SQ001
q_4_SQ002
q_4_SQ003
q_4_SQ004

into the synthax given under:

COMPUTE q_4_SQ001r=8-q_4_SQ001.
COMPUTE q_4_SQ002r=8-q_4_SQ002.
COMPUTE q_4_SQ003r=8-q_4_SQ003.
COMPUTE q_4_SQ004r=8-q_4_SQ004.

Please remark the dots in the end of each line I did this manually to give you an impression of what I would like to achieve. My data set has different questions and different variable strings so I would like to make my life a bit easier right now ๐Ÿ˜›

I also tried recording and running a macro as stated in here (http://stackoverflow.com/questions/2467875/notepad-replace-all-regular-expression-start-of-the-line-and-end-of-the-line) but that still is pretty time consuming since I have to do each line manulally and clean up with extended search in the end.

Wouldn’t it be easier to convert each line?

Thanks a bunch in advance ๐Ÿ™‚

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:41:16+00:00Added an answer on May 17, 2026 at 8:41 pm

    Funny, Notepad++ works under Wine, as I just found out ๐Ÿ˜‰

    New file, inserted:

    q_4_SQ001
    q_4_SQ002
    q_4_SQ003
    q_4_SQ004
    

    Select all (CTRL+A), replace (CTRL+R).

    Tick Regular Expr, stick ^(.*)$ in the “find” bit (first textbox), and COMPUTE \1r=8-\1. in the “replace” bit (second textbox). Hit the Find button, and then the Replace Rest button.

    Parenthesis () around a pattern cause the pattern to be “memorised”, each set of parenthesis available to the replacement pattern via \1, \2, etc.

    After the replace, I got:

    COMPUTE q_4_SQ001r=8-q_4_SQ001.
    COMPUTE q_4_SQ002r=8-q_4_SQ002.
    COMPUTE q_4_SQ003r=8-q_4_SQ003.
    COMPUTE q_4_SQ004r=8-q_4_SQ004.
    

    Which I assume is what you wanted. Enjoy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a busy photo website that has approximately 350,000 photos. The high resolution,
I have a pagination that needs to look like that: a busy cat http://img338.imageshack.us/img338/3180/pagination.jpg
I have a busy photo website that is currently making a new page request
I have an animated .gif that I want to use as a busy indicator.
I'm working as a developer, curently mantaining a VB6 app that desperately needs to
We are developing an application that will install on PC and it will perform
I am currently busy writting a javascript library. In that library I want to
I'm currently busy learning Ruby and Rails, and since I have a background in
I'm curently busy on a site for which i want to write a greasemonkey
I'm currently busy coding a hangman game in VB.NET. As a wordlist, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.