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

  • Home
  • SEARCH
  • 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 8293871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:59:05+00:00 2026-06-08T13:59:05+00:00

I want to append several strings in a data set with custom strings. Example

  • 0

I want to append several strings in a data set with custom strings.

Example

Content of Dataset:

Test1
Test2
Test3

Result after appending:

Test1.com
Test2.com
Test3.com

Would I have to use regex to parse to the end of each Test[n] to be able to append it with a custom string (.com)? Has anyone got an example that describes exactly how to do it?

I am reading from a SQL-Table and writing values into a DataSet which is exported to CSV the following way:

$DataSet.Tables[0] | ConvertTO-Csv -Delimiter ',' -NotypeInformation |`% { $_ -replace '"','' } |  out-file  $outfile -Encoding "unicode"

The DataSet contains of Strings such as:

Banana01
Banana02
Apple01
Cherry01
Cherry02
Cherry03

The thing I want to do is append .com to only Cherry01, Cherry02, and Cherry03, and after appending .com, export it as a CSV file.

  • 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-06-08T13:59:06+00:00Added an answer on June 8, 2026 at 1:59 pm

    There are many ways. Here are a few:

    # Using string concatenation
    'Test1','Test2','Test3' | Foreach-Object{ $_ + '.com' }
    
    # Using string expansion
    'Test1','Test2','Test3' | Foreach-Object{ "$_.com" }
    
    # Using string format
    'Test1','Test2','Test3' | Foreach-Object{ "{0}{1}" -f $_,'.com' }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a several strings, which i want to append to use it as
i want to append unlimited number of HTML elements with data given as comment.
I want to append .item element before .content element but it just simply removes
I want to append a <br /> to a particular class. Using the :after
I'm making a simple program to scrape content from several webpages. I want to
I want to append a div inside a div which have many divs inside
I want to append a record in a TClientDataSet based on another record (in
I want to .append to a div and pass the value on as html
I want to append more text behind UILabel in iOS. In other languages, we
If I want to append the contents of a src file into the end

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.