text:
Semi-Diagonal Alphabet
Given a letter of the English alphabet, your task is to build a semi-diagonal alphabet to the input.
How to build a Semi-Diagonal alphabet?
Brief Description:
First, you take the position of the letter in the alphabet, P (P is 1-indexed here). Then, you print each letter until the input (inclusive) on a line, preceded by P-1 and repeat that letter P times, interleaving with spaces.
Examples:

Given F, your program should output:

A
 B B
  C C C
   D D D D
    E E E E E
     F F F F F F

Given K, your program should output:

A
 B B
  C C C
   D D D D
    E E E E E
     F F F F F F
      G G G G G G G
       H H H H H H H H
        I I I I I I I I I
         J J J J J J J J J J
          K K K K K K K K K K K

Given A, your program should output:
A

Rules

You may choose either lowercase or uppercase characters, but that should be consistent.
You may have extraneous spaces as follows:

One consistent leading space (on each line).
A trailing or leading newline(s).
Trailing spaces.

Input and output can be taken by any standard mean, and default loopholes apply.
You are allowed to output a list of lines instead, as long as you also provide the ascii-art version.
This is code-golf, so the shortest code in bytes wins!

Inspired by this challenge.

Is output as list of strings ok?

It says under the rules that a list of lines is ok. I would assume this would mean yes @Adám

Ah, I can't read.

Why the downvote? What can i improve?

When you say "P is 1-indexed here", does here refer to the challenge or the example?

@pizzakingme The example, of course. P has no relevance overall

To rephrase, can we index from 0 and exclude the inputted character from the output?

@pizzakingme No, you may not.

I accidentlly got an interesting pattern while golfing my answer: https://tio.run/##K0nO@f@/OLVEIVGhupYLxMhUMDPlKsnMTVWohohHp@UX5SaWKMQoqCYrqGTGqiRaF5SWFMPFVaNTKwqKQDLFCiqJsdaZeclFCpm1CkZm//8DAA

Almost: https://tio.run/##K0nO@f@/OLVEIVGhupYLxMhUMDPhKsnMTVWohoirJEan5RflJpYoqBolK0Rn5iUXKWTGxloXlJYUK8ClIOLJCsaxMcVALbG1CkZm//8DAA

Python 3, 59 bytes
lambda l:[' '*i+'%c '%(i+65)*-~i for i in range(ord(l)-64)]

Try it online!
Python 3, 61 bytes
lambda l:[' '*i+-~i*(chr(i+65)+' ')for i in range(ord(l)-64)]

Try it online! (link to pretty-print version)

I see absolutely no reason for a downvote. Can the @downvoter explain?

I'd imagine it's just a misclick, or perhaps someone not liking a lack of explanation (the latter is quite unlikely IMO)

I dislike Python and I can't implement with Python, so the answer is not useful for me? Just kidding, but the button tooltips probably do not fit the rules of this site

Is it just me or does it say Mr. Xcoder has 1 rep...?

Python 2, 63 61 59 bytes
-2 bytes thanks to Rod. -2 bytes thanks to Felipe Nardi Batista.
i=1
exec"print' '*i+'%c '%(i+64)*i;i+=1;"*(ord(input())-64)

Try it online!

C, 89 bytes
i,j;f(l){for(i=64;i++<l&&printf("%*c ",i-64,i);puts(""))for(j=i-65;j--;)printf("%c ",i);}

Try it online!

PowerShell, 45 42 bytes
65..$args[0]|%{" "*$i+++"$([char]$_) "*$i}

Try it online!
Takes input as a literal char, then loops up through the capitals to that point, each iteration prepending the appropriate number of spaces and then the char\space hybrid.
Saved 3 bytes thanks to TessellatingHeckler.

@TessellatingHeckler Indeed. I've been golfing that to "$args" so much, which wouldn't work here, I forgot about the [0] method. Haha.

JavaScript (ES6), 85 bytes
Works in lower case for both input and output. Outputs a leading space and a trailing space on each line.
f=(c,k=10,C=k.toString(36),r=s=>`${s} `.repeat(k-9))=>r``+r(C)+(C==c?'':`
`+f(c,k+1))

Demo

f=(c,k=10,C=k.toString(36),r=s=>`${s} `.repeat(k-9))=>r``+r(C)+(C==c?'':`
`+f(c,k+1))

O.innerText = f('m')

\${s} `can be replaced by(s+"")` for one byte saving

@Luke I need this space. It can be replaced by (s+" "), but that's just as long.

APL (Dyalog), 26 bytes
Prompts for scalar character. Prints list of lines.
(∊⍴∘'',' ',¨⍨⊢⍴⊃∘⎕A)¨⍳⎕A⍳⎕

Try it online! (has ASCII art version at one additional byte)
⎕ prompt for input
⎕A⍳ find ɩndex in Alphabet
⍳ first that many ɩntegers
(…)¨ apply the following tacit function to each :
 ⊃∘⎕A pick the argument'th letter letter from the Alphabet
 ⊢⍴ cyclically reshape it to the argument length
 ' ',¨⍨ append a space to each
 ⍴∘'', prepend a string of argument length (padded with spaces)
 ∊ ϵnlist (flatten)

The ASCII art version just has a ↑ on the very left; mix list of strings into table of characters.

Perl 5, 31 bytes
30 bytes code + 1 for -l.
print$"x$-,"$_ "x++$-for A..<>

Try it online!

You can cut this down by using say instead of the -l flag: Try it online!

@Xcali I'm torn on -E/-M5.01, I've used say considerably in the past, and would probably abuse the fact that say is an alternative to print in a restricted source challenge or similar perhaps, but for the sake of -3, I'll keep as-is for now. See this meta post for a fair argument. Appreciate the input though!

Dyalog APL, 38 bytes
{↑{(y/' '),(2×y←⎕A⍳⍵)⍴⍵,' '}¨⎕A↑⍨⎕A⍳⍵}

Try it online!
How?
⎕A↑⍨ - take the alphabet until
⎕A⍳⍵ - the input character
¨ - for each char
    ⍵,' ' - take the char and a space
    (...)⍴ - reshape to
    2×y←⎕A⍳⍵ - twice the index of the char in the alphabet
    (y/' ') - and prepend index-of-char spaces
↑ - then flatten

05AB1E, 10 bytes
A¹¡н«ðâƶāú

Try it online!
-2 thanks to Adnan.
Append » to make it print in separate lines.

You could omit the < as one consistent leading space is okay.

A¹¡н«ðâƶāú should work for 10 bytes

@Adnan I think that ¹¡ will make it not work...oh so that's why there's a « in there. :p

V, 28, 26, 25, 23 bytes (Competing)
¬A[/a
lDÓ./& ò
ò-Ûä$Û>

Try it online!
Note that although I have been planning on adding certain features for a long time, this challenge was what convinced me to finally do it.
The output contains one leading space on each line and one trailing newline.
Hexdump:
00000000: ac41 5b2f 1261 0a6c 44d3 2e2f 2620 f20a  .A[/.a.lD../& ..
00000010: f22d dbe4 24db 3e                        .-..$.>

Explanation:
¬A[         " Insert 'ABCDEFGHIJKLMNOPQRSTUVWXYZ['
   /        " Search for...
    <C-r>a  "   The input
l           " Move one character to the right
 D          " And delete every character after the cursor
  Ó         " Search for...
   .        "   Any character
    /       " And replace it with...
     & ò    "   That character followed by a space and a newline
ò           " Recursively...
 -          "   Move to the beginning of the next line up
  Ûä$       "   Make *line number* copies of the current line
     Û>     "   And indent this line by *line number* spaces

This is competing. You may remove the title remark.

It's useful for those who weren't aware of the new meta, such as myself

APL (Dyalog Classic), 26 bytes
{↑{(≠\⍵<⍳3×⍵)\⍵⊃⎕A}¨⍳⎕A⍳⍵}

Try it online!
Explanation
                      ⍳⎕A⍳⍵  generate indexes up to position of right arg ⍵
{                   }¨       on each index apply function
   (≠\⍵<⍳3×⍵)                generate boolean mask for expansion (each line has a length 3 times its index ⍵, starting with ⍵ blanks and then alternating letter blank)
             \⍵⊃⎕A          expand character in position ⍵
 ↑                            mix result into text matrix

Goodness... 4 APL-er solving the same problem at the same time! :) I think in codegolf you're allowed to remove the outer {}, replace ⍵ with ⎕, and claim it's a "complete program" rather than a function. That would make your solution the best (so far).

Must be a good sign :) Thanks for the suggestion. I've seen it done but wasn't sure where to draw the line. I guess that I can save 3 bytes if I remove curlies and mix.

R,  94 88  bytes
-6 bytes thanks to Giuseppe
function(x,l=LETTERS)for(i in 1:match(x,l))cat(rep(' ',i-1),rep(paste(l[i],' '),i),'\n')}

Ungolfed:
f=function(x,l=letters){
  for(i in 1:which(l==x)){
    A=paste(l[i],' ')
    cat(rep(' ',i-1),rep(A,i),'\n')
  }
}

88 bytes : returning an anonymous function is fine, you can get rid of the braces since f is a one-liner, and using match instead of which saves a byte.

71 bytes

68 bytes taking input from stdin.

Haskell, 52 44 bytes
f k=[[" ",s:" "]>>=(['A'..s]>>)|s<-['A'..k]]

Returns a list of lines.
Try it online!
f k=                  -- main function is f, input parameter k
  [   |s<-['A'..k]]   -- for each s from ['A'..k]
     >>=              -- map (and collect the results in a single string) the function:
         (['A'..s]>>) --  replace each element in ['A'..s] with
    [  ,  ]           --  over the list, containing
     " "              --   a single space to get the indent
        s:" "         --   s followed by space to get the letter sequence

Edit: @jferard: saved three bytes. Thanks!

49 bytes:f k=[tail$[" ",s:" "]>>=(['A'..s]>>)|s<-['A'..k]]

@jferard: Thanks a lot. Rereading the challenge I noticed that a leading space per line is allowed, so we don't need the tail$.

Husk, 13 bytes
z+ḣ∞øzRNC1…'A

Takes a character in single quotes as command line argument, prints result to STDOUT.
Try it online!
Explanation
I'm exploiting the way Husk prints lists of lists of strings: join inner lists with spaces and outer lists with newlines.
z+ḣ∞øzRNC1…'A  Implicit input, say 'C'
          …'A  Range from A: "ABC"
        C1     Cut into strings of length 1: ["A","B","C"]
     z N       Zip with positive integers
      R        using repetition: x = [["A"],["B","B"],["C","C","C"]]
   ∞ø          The empty string repeated infinitely: ["","","",...
  ḣ            Prefixes: [[],[""],["",""],["","",""],...
z+             Zip with x using concatenation: [["A"],["","B","B"],["","","C","C","C"]]
               Implicitly join each inner list with spaces, join the resulting strings with newlines and print.

Japt -R, 24 23 17 15 bytes
Outputs an array, includes a leading newline and a leading & trailing space on each line.
IòUc ÏçSiXd¹iYç

Test it

1 byte saved with help from Oliver and a further 6 thanks to him pointing out a better way to generate the initial array.

05AB1E, 15 14 13 bytes
Saved 1 byte thanks to Adnan
A¹¡н«ƶ€S»¶¡āú»

Try it online!
or the Ascii art version
Explanation
A                # push lowercase alphabet
 ¹¡              # split at input
   н             # get the first part
    «            # append the input
     ƶ           # repeat each a number of times corresponding to its 1-based index
      €S         # split each to a list of chars
        »        # join on spaces and newlines
         ¶¡      # split on newlines
           āú    # prepend spaces to each corresponding to its 1-based index
             »   # join on newlines

It looks like we handled it a bit differently :D

@EriktheOutgolfer: We did it quite similarly, but your very nice idea to append a space before lifting, removing the need for the join made yours shorter. I hadn't read that leading/trailing spaces nor output as list was okay, so that'll hopefully teach me to read the whole challenge before implementing :P

tl;dr: vectorization :p

A¹¡н« instead of ADIk>£ should work

@Adnan: Thanks! I did have A¹¡н but didn't consider « to get the last letter so it wasn't good enough :P

You might have the links to the TIO and ASCII art version swapped

@Graviton: Indeed I do. Meaning since I switched them to this order, I actually had them correct the first time and then messed it up. Thanks for the heads up :)

JavaScript (ES8), 92 bytes
c=>(g=n=>n>9?[...g(n-1),`${n.toString(36)} `.repeat(n-=9).padStart(n*3)]:[])(parseInt(c,36))

Uses lowercase letters. Lines have one leading and one trailing space. Returns an array of lines.
Test Snippet

let f=

c=>(g=n=>n>9?[...g(n-1),`${n.toString(36)} `.repeat(n-=9).padStart(n*3)]:[])(parseInt(c,36))

;O.innerText=f("k").join`\n`

APL (Dyalog Unicode), 22 bytesSBCS
⍕⍪⊢∘⊂\2,.↑⍉⍴⍨⌸⎕a↑⍨⎕a⍳⍞

Try it online!
Uses ⎕io←1. Prints a leading space, which is allowed.

QBasic, 79 74 72 bytes
Thanks to Taylor Scott for byte savings (twice!)
FOR i=1TO ASC(INPUT$(1))-64
?TAB(i)
FOR j=1TO i
?CHR$(64+i)" ";
NEXT j,i

Uses uppercase. The input is by keypress and is not echoed to the screen.
Explanation
We loop i from 1 up to the limiting letter's position in the alphabet (1-based). For each i, we move to column i of the screen using TAB; then, i times, we print the ith letter of the alphabet followed by a space.

As it turns out you can use the INPUT$(1) command as a direct replacement for the variable z$ for a delta of -2 bytes

@TaylorScott Good idea, thanks!

Charcoal, 18 bytes
Ｆ⁺⌕αθ¹«Ｐ×⁺§αι ⁺ι¹↘

Try it online!

Nah, you can't let 05AB1E beat Charcoal... :P

@totallyhuman the revenge :p

Sadly arbitrary leading whitespace isn't allowed otherwise Ｅ…·?θ⁺× κ⪫× κι would do the job in 14 bytes.

@Neil One leading whitespace is allowed, but I'm not sure how ? got in there. It should be A instead I think. Oh wait, ohhhhh I see what you mean.

Pyth, 17 bytes
.e+*kd*+bdhk<GhxG

Try it here (pretty print version).

How does this work?

hxG - Takes the index of the input in the lowercase alphabet.

<G - Trims every character after the input from the alphabet.

.e - Enumerated Map. Maps over the trimmed alphabet with the indexes as k and the letters as b.

*kd - Append k spaces.

+bd - b + a space (the current letter + space).

*...hk - Repeat k+1 times.

+(...)(...) - Concatenate.

One of my favorite things about Pyth is writing an answer and finding that someone wrote the same answer, character for character. It hits that Python "there is a best answer" spot perfectly!

@pizzakingme Yeah, I wonder if I can do better

the space addition feels wrong, I think better is possible

@pizzakingme I could get .e+*kdjd*bhk<GhxG as 17 bytes as well

16 bytes: .e+*kd*+bdhkhcGQ

Oh actually that doesn't include Q

Braingolf, 65 bytes
a#a-# 7-,-~vc<!?>[$_]:$_|&,(.#a-!?.>[# M]1+>[.M# M]:$_!@|v#
&@R);

Try it online!
Lowercase.
Contains 1 trailing space on each line, and a trailing newline at the end of output.

SOGL V0.12, 15 14 12 bytes
ZZ,Wm{ē@Ο}¹¾

Try it Here!

Mathematica, 70 bytes
(T=Table)[""<>{" "~T~i,T[Alphabet[][[i]]<>" ",i]},{i,LetterNumber@#}]&

lowercase
outputs a list
thanx @ngenisis for corrections
For ascii-art version place Column@ at the beginning

JavaScript, 102 94 bytes
2 bytes saved thanks to Neil

f=
a=>[...Array(parseInt(a,36)-9)].map((a,b)=>''.padEnd(b).padEnd(b*3+1,(b+10).toString(36)+' '))

console.log(f('k').join`\n`)

C# (.NET Core), 103 bytes
n=>{var i='`';var l="";for(;i<n;l+='\n'){l+="".PadLeft(i++-96);for(int s=96;s++<i;)l+=i+" ";}return l;}

Try it online!

Retina, 51 bytes
^.
$&$&
}T`L`_L`^.
.
$.`$* $&$.`$* ¶
+`(\w) \B
$&$1

Try it online! Explanation:
^.
$&$&

Duplicate the (first) letter.
}T`L`_L`^.

Rotate it back 1 in the alphabet, or delete it if it's a duplicate A. Keep duplicating and rotating until we duplicate A, at which point the deletion undoes the duplication and the loop completes.
.
$.`$* $&$.`$* ¶

Replace each letter with a line with the letter padded on both sides.
+`(\w) \B
$&$1

Insert duplicate letters between all pairs of padding spaces to the right of existing letters.

Haskell, 57 bytes
x!'@'=x
x!e=([e]:[' ':r++' ':[last r]|r<-x])!pred e
([]!)

Try it online!

Charcoal, 15 bytes
Ｆ…·AＳ«Ｐ⪫Ｅ…@ιι ↘

Try it online! Link is to verbose version of code. Explanation:
 …·AＳ           Inclusive character range from A to the input
Ｆ    «          Loop over each character
         …@ι    Exclusive range from @ to the current character
        Ｅ   ι   Replace each element with the current character
       ⪫        Join with spaces
      Ｐ         Print without moving the cursor.
              ↘ Move the cursor down and right.

If extra padding was legal, this would work for 14 bytes:
Ｅ…·?θ⁺× κ⪫× κι

Try it online! Link is to verbose version of code.

Excel VBA, 72 Bytes
Anonymous VBE immediate window function that takes input from cell A1 and outputs to the VBE immediate window
For i=1To Asc([A1])-64:[B1]=i:?Space(i-1)[REPT(CHAR(B1+64)&" ",B1)]:Next

Very naïve approach.
Tcl, 100 bytes
time {puts [format %[incr i]s \ ][string repe [format %c\  [expr $i+64]] $i]} [expr [scan $c %c]-64]

Try it online!

Tcl, 106 bytes
set i 0;while \$i<[scan $c %c]-64 {puts [format %$i.s \ ][string repe [format %2c [expr $i+65]] [incr i]]}

Try it online!

Below approahes do not have a leading space
Tcl, 107 bytes
set i 0;while \$i<[scan $c %c]-64 {puts [format %$i.s \ ][string repe [format %c [expr $i+65]]\  [incr i]]}

Try it online!
Tcl, 109 bytes
set i 0;time {puts [format %$i.s \ ][string repe [format %c [expr $i+65]]\  [incr i]]} [expr [scan $c %c]-64]

Try it online!
Tcl, 111 bytes
set i 0;time {puts [string repe \  $i][string repe [format %c [expr $i+65]]\  [incr i]]} [expr [scan $c %c]-64]

Try it online!

Failed outgolf on https://tio.run/##PYyxCoQwEER7v2IKLa9RsfEzrsxtETZRFjQnyQqC@O25iHDdzBveKC959pqQ1EkA5@QVFudV3UEw9JXK6nE@vLZm@sbVKpqWYSRwhBCN214u/tPDHTr6pKLQBXPrDsYfWyyFbUDNaJheQ0@U8/sH

Recursiva, 28 bytes
{B-Oa64"P+*' '~}J' '*}C+64}"

Try it online!

PHP, 69+1 bytes
A<?for($c=A;$c<$argn;)echo($p=str_pad)($p("
",++$i+1),$i*3,++$c." ");

Run as pipe with -nF or try it online.

The Z case cost 4 bytes. for($c=A;$c<=$argn;)echo($p=str_pad)($p("
",++$i),$i*3,$c++." "); (with -nR) works for A to Y.
Printing a list of underscore-separated lines would save two bytes, but that´d feel like cheating.

Alice, 31 bytes
/A''*?h~w0O~
\I"AxrS&..r!y"kx@/

Try it online!
Explanation
Linearized and with relevant spaces included, the program is as follows:
I'A*rh&w.O!" x A"'x?S~.0r~yk@

I                                   take input
 'A*                                append the letter A
    r                               expand to range (e.g., if input was D, string is now DCBA)
     h&w                            split string into characters, and repeat the main loop that number of times
        .O                          output copy of top string on stack with newline
          !                         move top string (last printed row) to tape
           " x A"                   push " x A"
                 'x S               replace the occurrence of "x" with
                   ?                  the string on the tape
                     ~              swap to get next letter
                      .             copy this letter
                       0r           get entire range from that letter down to "0"
                         ~          swap again to put letter on top of stack
                          y         replace all characters in this range (effectively, all non-space characters) with the next letter
                           k        repeat (end of main loop)
                            @       exit

Pyth, 18 17 bytes
-1 thanks to @TheIOSCoder because you are apparently allowed to surround the input in quotes
j.b+*dYjd*NhYGhxG

Try it online!
Explanation
j.b+*dYjd*NhYGhxG    accepts a token as input, must be lowercase and in quotes

j                    joins on new line
 .b   Y   N Y        maps A (lambdas NY) over B and C in parallel
   +                 joins two strings on same line
    *    *           repeats A B times
     d  d            " " or space
       j             joins B on A
           h  h      A + 1
             G  G    lowercase alphabet
               x     returns position of B in A
                     implicit input

You can use the input with quotes around to save 1 byte through implicit input (Q) - 17 bytes

C++ (gcc), 164 bytes
#include<iostream>
#define f for(int i=0;i<o-'`';i++)
using namespace std;int main(){char c;cin>>c;for(char o='a';o<=c;o++){f cout<<' ';f cout<<o<<' ';cout<<'\n';}}

My first attempt after a long time lurking!
Ungolfed code below:
#include <iostream>

using namespace std;
#define f for (auto i = 0; i < output - '`'; i++)

int main()
{
  char input;

  cin >> input;

  for (char output = 'a'; output <= input; output++)
  {
    f cout << ' ';

    f cout << output << ' ';

    cout << endl;
  }
}

Try it online!

I know there has to be a bunch of golfing things to do, but so far, that's the smallest I've gotten.

brainfuck, 111 bytes
>+[+[<]>>+<+],>>++++++++++>++++[>++++++++<-]----[<<<->>>----]<<<-[<[-<+>>>>>.<<<<]+<[->+>>.>>.<<<<<]>>>.+>.<<-]

Try it online!
Surprising how the Turing Tarpit itself can out-golf some other languages.
The breakdown:
Section A
>+[+[<]>>+<+]                                                       create character 'A'
             ,                                                      take input
              >>++++++++++                                          create '\n' character
                          >++++[>++++++++<-]                        create ' ' character
                                            ----[<<<->>>----]<<<-   map input to (1->26)

Section B
[<[-<+>>>>>.<<<<]+                                 print N spaces, then increment N
                  <[->+>>.>>.<<<<<]                print (N-1) of the Nth letter and spaces
                                   >>>.+>.<<-]     print additional letter, and newline

><>, 85 Bytes
i1-&0\1o*84\      \o*84o:$\
@)?;&>:> :?/~1+:88*+$:@>:?/~ao&:
     /-/          /$1- /

Try it online

This is almost a four-finned fish... coincidence?

Java (OpenJDK 8), 81 bytes
c->{String s="";for(int d=64;d++<c;)System.out.printf((s=" "+s+"%1$c ")+"%n",d);}

Try it online!

Brain-Flak, 179 bytes
({}[((((()()()()){}){}){}){}]){((({}[()])())){({}<(({})<>((((()()()()){}){}){}){
})((((()()()()){}){}){})<>>[()])}{}{({}[()])<>((((()()()()){}){}){})<>}{}<>{}(((
)()()()()){})<>}<>

This is 178 bytes of code, and +1 for the -c flag.
Try it online!
(Semi-)Readable version:
({}[((((()()()()){}){}){}){}])

{

    ((({}[()])()))

    {
        ({}<

            (({})<>((((()()()()){}){}){}){})
            ((((()()()()){}){}){})<>

        >[()])
    }{}

    {
        ({}[()])
        <>
        ((((()()()()){}){}){})
        <>
    }{}

    <>{}

    ((()()()()()){})

    <>

}

Fun fact: This will work with arbitrary characters above Z! Try it online!

Bash, 93 90 bytes
for c in {A..Z}
{
printf "%$[i++*3+2]s\n" "$(echo `yes $c|head -$i`)"
[ $c = $1 ]&&break
}

Try it online!
Takes input as, and outputs as, uppercase letters.
Still getting the hang of golfing in Bash, so I'm open to tips.

C (GCC), 115 109 Bytes
f(a,n,k,s,i){if(k){for(;i<s;i++)printf(" ");for(i=0;i<s+1;i++)printf("%c ",a);puts();f(++a,++n,--k,++s,0);}}

Usage
f(65,5,5,0,0)

Where the two 5's are the given K value, the rest are constants used later for recursive calls.
Ungolfed
f(a,n,k,s,i){
    if(k){
        for (; i<s; i++) printf(" ");
        for (i=0; i<s+1; i++) printf("%c ",a);
        puts();
        f(++a,++n,--k,++s,0);
    }
}

Output

C (gcc), 77 bytes
i,j;f(c){for(j=64;i||j++<c&&printf("\n%*c ",i=j-64,j);--i&&printf("%c ",j));}

Try it online!
Contains unsequenced access to possibly incremented j, so very likely to break with a different compiler :)
fixed with identical byte count

Ruby, 62 Bytes
Assumes input as a string (e.g., 'A'). Wasn't clear from the rules whether this was allowed. Will update if not.
Lots of room for improvement, I'm sure.
->n{a=[*'A'..n];a.map{|x|' '*a.index(x)+(x+' ')*-~a.index(x)}}

BTW This is definitely a valid way to take input. +1

Excel VBA, 78 71 Bytes
Anonymous VBE immediate window function that takes input from range [A1] and outputs to the VBE immediate window
For i=1To[Code(A1)-64]:?:?Spc(i-1);:For j=1To i:?Chr(i+64)" ";:Next j,i

-1 Byte for switching to leading newline over trailing, and condensing Next statements
-6 bytes for using Spc() over String()

K (oK), 35 bytes
Solution:
`c${,/(x#32),(x+1)#,65+x,-33}'!-64+

Returns list of strings. prepend `0: to write to stdout instead.
Try it online!
Example:
`c${,/(x#32),(x+1)#,65+x,-33}'!-64+"F"
("A "
 " B B "
 "  C C C "
 "   D D D D "
 "    E E E E E "
 "     F F F F F F ")

Explanation:
Struggled to golf this down any further... K is interpretted right-to-left:
`c${,/(x#32),(x+1)#,65+x,-33}'!-64+ / the solution
                               -64+ / subtract 64 from input, "F"=>6 (implicit ascii)
                              !     / til, !6 => 0 1 2 3 4 5
   {                        }'      / lambda function with each input
                         -33        / negative 33
                       x,           / x concatenated, e.g. 0 -33
                    65+             / add 65, 0 -33 => 65 32 (aka "A ")
                   ,                / enlist, wraps "A " into a list ("A ")
             (x+1)#                 / take (#) x+1 instances of this list
            ,                       / concatenate with
      (x#32)                        / x instances of the number 32 (aka " ")
    ,/                              / raze, flattens this list down
`c$                                 / cast to characters

C (gcc), 76 bytes
i,j;f(c){for(i=0;i++<c-64;puts(""))for(j=0;j<i;)printf("%*c",j++?2:i,i+64);}

Try it online!

Pip, 22 21 bytes
FxzIxLEaPsXi.YxX++iJs

Uses lowercase and takes input from the command line. Try it online!
Explanation
Implicit: a is 1st cmdline arg; z is lowercase alphabet; i is 0; s is space.
Fxz                      For each letter x in lowercase alphabet:
   IxLEa                  If x is less than or equal to a:
        P                  Print
         sXi               i spaces
            .Y             to which concatenate (the Y enforces precedence)
              xX++i        x repeated i times, after incrementing i
                   Js      joined on spaces

SNOBOL4 (CSNOBOL4), 115 bytes
	U =&UCASE
	U INPUT @L
N	U POS(X) LEN(1) . R
	OUTPUT =DUPL(' ',X) DUPL(R ' ',X + 1)
	X =LT(X,L - 1) X + 1	:S(N)
END

Try it online!

Swift, 133 bytes
func f(c:String){for i in 9..<Int(c,radix:36)!{var s=""
for _ in 9..[" "^i*"$c "^i for (i,c) in enumerate('A':x)]

Try it online!

Julia 0.6, 40 bytes
c->[" "^i*"$('A'+i) "^-~i for i=0:c-'A']

Try it online!
Returns an array of strings containing the output. (Pretty printed on TIO using just map (println, f(c)).)
^ applied to strings repeats the string that many times. $() executes its content and pastes the result into the string (here, the correct letter for the line). Finally, the space repetition and the letter repetition are concatenated with *.

Burlesque - 39 bytes
-]'Ajr@id?i?*m{' []}zim{p^' j?*j_+}unsh

This is not fully golfed yet and (trivially at least the sh can be replaced with Q) but it's a first start. m{}un can probably be replaced by a version of map that unlines and zim[ is a good candidate for a shortcut in the near future. The two maps can also probably be merged together into a single map.

Kotlin, 57 bytes
{('A'..it).map{" ".repeat(it-'A')+"$it ".repeat(it-'@')}}

Try it online!

Common Lisp, 89 bytes
(dotimes(m(-(char-code(read))63))(format t"~va~v@{~c ~:*~}~%"m #\  m(code-char(+ m 64))))

Try it online!

SmileBASIC, 58 57 bytes
INPUT E$WHILE L$<E$L=L+1L$=CHR$(L+#X)+" "?" "*L;L$*L
WEND

Excel
=LET(x,SEQUENCE(CODE(A1)-64),REPT(" ",x-1)&REPT(CHAR(64+x),x))

Link to Spreadsheet

Vyxal rMj, 16 13 bytes
Thanks to @Lyxal for -3 bytes by using Map Lambda instead of a for loop.
kAḟƛ›nkAi*Ṅn꘍

Try it Online!
Explanation:
               # Implicit input
kA             # Constant 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  ḟ            # Index of input in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ’
   ƛ           # Map over range [0,index)
     nkAi      # Index of n in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    ›    *     # Multiply by n+1
          Ṅ    # Join with spaces
           n꘍  # Prepend n spaces
               # 'j' flag - Join top of stack with newlines and print

14 bytes using mapping and rM or 13 bytes using mapping and rMj (3 flags - might be considered too "flaggy")

Vim, 45 bytes
D:h<_
jjYZZPJ/<C-r>-
lDqqha
<esc>:,$s/\S/ & &
{$@qq@q

Uses lowercase. Try it online!
Explanation
D

Delete the input letter (we'll use it later).
:h<_<cr>jjYZZ

Yank the lowercase alphabet from an article in the help file (see this tip).
PJ

Paste the alphabet and turn the blank line (where the input used to be) into a trailing space.
/<C-r>-<cr>

Find the input letter (pasting it into the find command from the "small deletion" register -).
lD

Move one character to the right and delete everything till the end of the line. We now have one line containing letters a through the input letter, with the cursor on the last character of the line.
qqh

Begin recording macro q. Try going left one character. If this fails, we've gotten all the way to a and we're done; the macro exits. Otherwise, the cursor is now on the second-last character of the top line.
a<cr><esc>

Insert a newline after the cursor, moving the final character of the top line to its own line.
:,$s/\S/ & &<cr>

On every line from this second line till the end of the file, substitute the first non-space character for space, itself, space, and itself again. This turns a line like c into  c c,  d d into   d d d, etc.
{$@q

Go back to the first line, then go to the end of the line and run the macro recursively.
q@q

Stop recording, and call the macro.

Python 2, 101 99 bytes
-2 because I forgot I could remove the parentheses in print
def f(l,a="abcdefghijklmnopqrstuvwxyz",s=0):
 for c in a[:a.index(l)+1]:print" "*s+(c+" ")*-~s;s+=1

Try it online!

Ruby, 43 bytes
->c{i=0
(?A..c).map{" "*(i+=1)+[_1]*i*" "}}

Attempt This Online!

Vyxal, 20 bytes
C65-›ɾ(nIn‹kAin*Ṅ+,)

Try it Online!
Explanation:
C65-›ɾ  # range from 1 to 0-25 depending on which letter is inputted
 (  # begin loop
  nI  # push n (current loop variable) spaces to the stack
   n‹kAin*Ṅ+  # which letter of the alphabet is n and push n letters
    separated by spaces
     ,  # output

Röda, 53 bytes
f L{seq 0,ord(L)-65|[" "*_..`${chr(_1+65)} `*(_1+1)]}

Try it online!

CJam, 22 21 20 bytes
This is the "list of lines" version. Just add an "N" before the close bracket to make it look nice. (Thanks to @Erik)
rc'@-{)_S*\_'@+*S*}%

Try it Online (nice version).

i64 can be '@

Oh, and you can re-order your code like this to avoid leading spaces: rc'@-{_S*\)_'@+*S*N}%

Charcoal, 19 bytes
Ｆ⁻℅Ｓ⁶³«×⁺℅⁺ι⁶⁴ ιＪιι

Try it online! Link is to verbose version.
A bit of a different approach from the other answer, let's see if it's golfable...

Proton, 47 bytes
c=>[' '*i+-~i*('%c '%(i+65))for i:0..ord(c)-64]

Not unlike the Python answers.
Try it online!

J, 39 bytes
[:(#\([' '&,1j1##)"0])i.@>:&.(65-~3&u:)

Try it online!

Jelly, 19 bytes
ḢØAḣi¥p⁶ẋ"J$µLḶ⁶ẋ;"

Try it online!
Function that returns a list. Append ⁸Y to print in separate lines. Erase the footer to show actual output instead of string representation.

Shnap, 97 96 bytes
-1 byte because I remembered that the parser reads strings through newlines, so a literal newline is shorter than \n
$c{n=65s=""for k:range(n,c+1){for range(n,k)s+=" "for range(n,k+1)s+=char(k)+" "s+="
"}return:s}

This is an anonymous function (actually, all functions in Shnap are anonymous...).
Try it online!
Alternative version that uses the fact that blocks return the last instruction's value
Ungolfed/explanation:
$ (c) {                  //Function with 1 parameter
    n=65                    //Value of 'A'
    s=""                    //The result
    for k:range(n,c+1) {    //Inclusive range from n to c, range(n,c,1,1) also works, as third arg is step and fourth is inclusive (bool).
                            //For loop variable is k
        for range(n,k)      //Exclusive range from n to k
            s+=" "          //Add a space
        for range(n,k+1)    //Inclusive range from n to k
            s+=char(k)+" "  //Add k and a space
        s+="\n"             //Add a newline

    }
    return:s                //Return the result
}

I really should implement string multiplication and eval...

TXR Lisp, 77 bytes
(do mapdo(op pprinl`@{""@2}@{(take(inc @2)(gun @1))}`)(range #\A@1)(range 0))

Run:
This is the TXR Lisp interactive listener of TXR 184.
Quit with :quit or Ctrl-D on empty line. Ctrl-X ? for cheatsheet.
1> (do mapdo(op pprinl`@{""@2}@{(take(inc @2)(gun @1))}`)(range #\A@1)(range 0))
#<interpreted fun: lambda (#:arg-01-0173 . #:rest-0172)>
2> [*1 #\F]
A
 B B
  C C C
   D D D D
    E E E E E
     F F F F F F

Pyth, 26 bytes
Should meet OPs specs.
VhxrG1w++*dNr@GN1*+dr@GN1N

Try it online!

I am afraid you misunderstood. You must have exactly one space between the characters, not many. See my answer for clarifications.

Ah, sorry. I'll fix that

C++ (gcc), 179 bytes
Well, someone ought to post the most un-original method, I might as well be that someone.
#include <iostream>
using namespace std;
int main(){char n;cin>>n;for(char i='A';i<=n;i++){for(char k='A';k<i;k++){cout<<" ";}for(int j=0;j<=i-'A';j++){cout<<i<<" ";}cout<<endl;}}

An easier-to-read version of the code:
#include <iostream>
using namespace std;
int main()
{
    char n;
    cin>>n;
    for (char i='A';i<=n;i++)
    {
        for (int k=0;k<n-i;k++)
        {
            cout<<" ";
        }
        for (int j=0; j<n-'A'+1;j++)
        {
            cout<<i<<" ";
        }
        cout<<endl;
    }
}

Try it online!

Java, 363 bytes
public class MyClass {
    public static void main(String args[]) {
        char x='A';
        int count=0;
      for(x='A';x<='Z';x++){
        for(int x1=count;x1>0;x1--) {
            System.out.print(" ");
        }
        for(int y=count;y>=1;y--) {
            System.out.print(x);
        }
        System.out.print(x+"\n");
       count++;
    }
    }
}

make sure your answer is consistent with the other answers by using a title and a byte count

Welcome to Programming Puzzles and Code Golf! Notice that you can remove a lot of the whitespace to shorten your code. Also, your code should print a space between the letters on each line. Changing System.out.print(x); to System.out.print(x+" "); will do the trick.

How do we enter any parameter? Like that limits where we stop? This is present in the question, I don't see it in this answer.


text:
Case Matching Find Replace
Take three inputs, a string of text, T; a string of characters to replace, F; and a string of characters to replace them with, R. For each substring of T with the same (case insensitive) characters as F, replace them with the characters in R. However, keep the same case as the original text.
If there are more characters in R than F, the extra characters should be the same case as they are in R. If there are numbers or symbols in F, then the corresponding characters in R should keep the case they have in R. F will not necessarily appear in T.
You can assume all text will be in the printable ASCII range.
Examples
"Text input", "text", "test" -> "Test input"

"tHiS Is a PiEcE oF tExT", "is", "abcde" -> "tHaBcde Abcde a PiEcE oF tExT"

"The birch canoe slid on the smooth planks", "o", " OH MY " -> "The birch can OH MY e slid  OH MY n the sm OH MY  OH MY th planks"

"The score was 10 to 5", "10", "tEn" -> "The score was tEn to 5"

"I wrote my code in Brain$#@!", "$#@!", "Friend" -> "I wrote my code in BrainFriend"

"This challenge was created by Andrew Piliser", "Andrew Piliser", "Martin Ender" -> "This challenge was created by Martin Ender"

// Has a match, but does not match case
"John does not know", "John Doe", "Jane Doe" -> "Jane does not know"

// No match
"Glue the sheet to the dark blue background", "Glue the sheet to the dark-blue background", "foo" -> "Glue the sheet to the dark blue background"

// Only take full matches
"aaa", "aa", "b" -> "ba"

// Apply matching once across the string as a whole, do not iterate on replaced text
"aaaa", "aa", "a" -> "aa"

"TeXT input", "text", "test" -> "TeST input"

Sandbox link

Requesting an example with weird casing: "TeXT input", "text", "test"

@EngineerToast Added example

Unsure why I found "The birch canoe slid on the smooth planks", "o", " OH MY " so humorous, but I loved that example.

APL (Dyalog), 75 73 72 bytes
Prompts for T, R, and F in that order. R must b given in Dyalog transformation format and F must be given in PCRE format.
⍞⎕R(⍞∘{(⊣⌿d)l¨⍨(1∘⌷≠(⊢⌿d∊⎕A,l⎕A)∧≠⌿)d≠(l←819⌶)d←↑⍺⍵.Match↑¨⍨≢⍺})⍠1⊢⍞

Try it online!
⍞ prompt for T
⊢ yield that (separates 1 and T)
⍞⎕R(…)⍠1 prompt for F and Replace matches with the result of the following function:
 ⍞∘{…} derive a monadic function by tying the prompted-for R as left argument to:
  ≢⍺ count the number of letters in R
  ⍺⍵.Match↑¨⍨ take that many letters from each of R and the match
   ⍺ is the left argument, which we tied R as.
   ⍵ is a namespace in which Match contains the currently found string.
  ↑ mix those two into a two-row matrix
  d← store as d
  (…)  apply the following tacit function to that:
   819⌶ lowercase (mnemonic: 819 looks like Big)
   l← store that function as as l
  d≠ Boolean where d differs (i.e. gives 0/1 for each lowercase/uppercase letter)
  (…) apply the following tacit function to that:
   ≠⌿ vertical XOR
   (…)∧ Boolean AND with the following array:
    l⎕A lowercased Alphabet
    ⎕A, prepend uppercase Alphabet
    d∊ Boolean for each letter in d whether a member of that (i.e. whether a letter)
    ⊢⌿ last row i.e. for character of the match whether it is a letter
   1∘⌷≠ XOR with the first row, i.e. whether each character of R is uppercase
  (…)l¨⍨ use that to lowercase (if 0) or uppercase (if 1) each letter of:
   ⊣⌿ the first row, i.e. R

* Byte count for Dyalog Classic using ⎕OPT  instead of ⍠.

Retina, 116 bytes
i`(.+)(?=.*¶\1(¶.*)$)|.*¶.*$
¶¶$2¶$1¶¶
{T`l`L`¶¶.(?=.*¶[A-Z])
T`L`l`¶¶.(?=.*¶[a-z])
}`¶¶¶(.)(.*¶).
$1¶¶¶$2
¶¶¶¶.*|¶

Try it online! Explanation:
i`(.+)(?=.*¶\1(¶.*)$)|.*¶.*$
¶¶$2¶$1¶¶

This searches T and whenever there's a case-insensitive match against the lookahead to F the match is surrounded in a bunch of newlines and the lookahead to R is also inserted.
{T`l`L`¶¶.(?=.*¶[A-Z])
T`L`l`¶¶.(?=.*¶[a-z])
}`¶¶¶(.)(.*¶).
$1¶¶¶$2

Each letter of the copy of R is adjusted in case to match that of the match, following which it is moved out of the working area so that the next letter can be processed, until either the copy of R or the match runs out of letters.
¶¶¶¶.*|¶

If the copy of R runs out of letters, then the remainder of the match will be preceded by 4 newlines, so delete it. Otherwise, anything left will be left-over pieces of copies of R which need to be concatenated with the non-matching parts of the input to produce the result.

PowerShell, 190 bytes
param($T,$F,$R)[regex]::Replace($T,'(?i)'+[regex]::escape($F),{param($m)-join(0..$R.Length|%{(($y=$R[$_]),("$y"."To$((('Low','Upp')[($z="$m"[$_])-cmatch($C='[A-Z]')]))er"()))[$z-match$C]})})

Try it online!
Explanation:
[Regex]::Replace(
    input text T,
    Find text F with case insensitive and [regex]::escape() for symbols,
    {scriptblock} for computing the replacement
)

The replacment scriptblock does:
$m is the matched text with case information
loop over each character in R as $y
    $z is the same index character in $m ($null if R overruns)
    $z-match'[A-Z]' checks if alphabetic, so we must to case-match
      otherwise, non-alphabetic or null, no case-match, return $y unchanged.
    if case-matching, check if z case-sensitive matches '[A-Z]' and
      use dynamic method calling from a generated string, either
      $y."ToLower"()
      $y."ToUpper"()
      to force the match
-join the loop output into a replacement string

Test cases:
function f {
param($T,$F,$R)[regex]::Replace($T,'(?i)'+[regex]::escape($F),{param($m)-join(0..$R.Length|%{(($y=$R[$_]),("$y"."To$((('Low','Upp')[($z="$m"[$_])-cmatch($C='[A-Z]')]))er"()))[$z-match$C]})})
}

Import-Module Pester

$Cases = @(
    @{Text = "Text input"; Find = "text"; Replace = "test"; Result = "Test input" }
    @{Text = "tHiS Is a PiEcE oF tExT"; Find = "is"; Replace = "abcde"; Result = "tHaBcde Abcde a PiEcE oF tExT" }
    @{Text = "The birch canoe slid on the smooth planks"; Find = "o"; Replace = " OH MY "; Result = "The birch can OH MY e slid  OH MY n the sm OH MY  OH MY th planks" }
    @{Text = "The score was 10 to 5"; Find = "10"; Replace = "tEn"; Result = "The score was tEn to 5" }
    @{Text = "I wrote my code in Brain$#@!"; Find = "$#@!"; Replace = "Friend"; Result = "I wrote my code in BrainFriend" }
    @{Text = "This challenge was created by Andrew Piliser"; Find = "Andrew Piliser"; Replace = "Martin Ender"; Result = "This challenge was created by Martin Ender" }
    @{Text = "John does not know"; Find = "John Doe"; Replace = "Jane Doe" ; Result ="Jane does not know" }
    @{Text = "Glue the sheet to the dark blue background"; Find = "Glue the sheet to the dark-blue background"; Replace = "foo"; Result ="Glue the sheet to the dark blue background" }
    @{Text = "aaa" ; Find = "aa"; Replace = "b"; Result ="ba" }
    @{Text = "aaaa"; Find = "aa"; Replace = "a"; Result ="aa" }
    @{Text = "TeXT input"; Find = "text"; Replace = "test"; Result ="TeST input" }
)

Describe "Tests" {

    It "works on /<Text>/<Find>/<Replace>/ == '<Result>'" -TestCases $Cases {
        param($Text, $Find, $Replace, $Result)
        f $Text $Find $Replace | Should -BeExactly $Result
    }

}

Perl 5, 108 bytes
107 bytes code + 1 for -p.
chomp(($s,$r)=<>);s|\Q$s|$&=~s!.!$_=substr$r,"@-",1;$&=~/[a-z]/i?$&eq uc$&?uc:lc:$_!egr.substr$r,"@-"+1|gie

Try it online!

Withdrawn.  Dom's answer beats it by a long shot.
# Perl 5, 136 + 1 (-p) = 137 bytes
$f=<>;chomp$f;@R=($r=<>)=~/./g;for$i(/\Q$f/gi){$c=$n='';$"=$R[$c++],$n.=/[A-Z]/?uc$":/[a-z]/?lc$":$"for$i=~/./g;s/\Q$i/$n.substr$r,$c/e}

Try it online!
made a huge cut after @Dom Hastings mentioned \Q
# Perl 5, 176 + 1 (-p) = 177 bytes
sub h($){chomp@_;pop=~s/[^a-z0-9 ]/\\$&/gir}$f=h<>;@R=($r=<>)=~/./g;for$i(/$f/gi){$c=$n='';$"=$R[$c++],$n.=/[A-Z]/?uc$":/[a-z]/?lc$":$"for$i=~/./g;$i=h$i;s/$i/$n.substr$r,$c/e}

Try it online!

Passes all test cases now ;) 108: Try it online!

You should post it.  It beats mine by quite a bit.

Fair enough! Was fun making it. I do enjoy the challenge!

C (gcc), 210 211 207 189 bytes
Had to add one byte to fix a bug with the capitalization for the "BrainFriend" testcase
Wow was this tedious...  Now to golf away some bytes
char*c,*p;d,l;f(t,f,r){for(d=isalpha(*(p=f)),p=c=t;c=strcasestr(c,f);p=c+=l>0?l:0){for(l=strlen(f);p<c;)putchar(*p++);for(p=r;*p;p++,c+=l-->0)putchar(d*l<1?*p:*c&32?*p|32:*p&~32);}puts(p);}

Try it online!

I'm probably missing something obvious, but why do you need the *(p=f) when you set p=c=t just afterward? I tried it with just *f and it didn't work, so it's not getting immediately overwritten.

f is by befault an int so we can't dereference it to get a char, but p is a char*

Ah, that makes sense. So it's a shorter way of writing *((char*)f)? Cool!

Python 2, 193 200 bytes
T,F,R=input()
w=str.lower
i=-len(T)
l=len(F)
T+=' '
while i:
 s=T[i:i+l]
 if w(s)==w(F):T=T[:i]+`[[y,[w(y),y.upper()][x<'a']][x.isalpha()]for x,y in zip(s,R)]`[2::5]+R[l:]+T[i+l:];i+=l-1
 i+=1
print T

Try it online!

This (193 bytes, from TIO link) will fail to find matches at the end of the string.

TXR Lisp, 285 bytes
(defun f(s f r)(let*((w(copy s))(x(regex-compile ^(compound,(upcase-str f))))(m(reverse(tok-where(upcase-str s)x))))(each((n m))(set[w n]r) (for((i(from n)))((< i (min(to n)(len w))))((inc i))(cond((chr-isupper[s i])(upd[w i]chr-toupper))((chr-islower[s i])(upd[w i]chr-tolower)))))w))

Conventionally formatted original:
(defun f (s f r)
  (let* ((w (copy s))
         (x (regex-compile ^(compound ,(upcase-str f))))
         (m (reverse (tok-where (upcase-str s) x))))
    (each ((n m))
      (set [w n] r)
      (for ((i (from n))) ((< i (min (to n) (len w)))) ((inc i))
        (cond ((chr-isupper [s i]) (upd [w i] chr-toupper))
              ((chr-islower [s i]) (upd [w i] chr-tolower)))))
    w))

JavaScript, 177 bytes
(T,F,R)=>T.replace(eval(`/${F.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&')}/gi`),F=>[...R].map((r,i)=>/[A-Z]/i.test(f=F[i]||'')?r[`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():r).join``)

F=
(T,F,R)=>T.replace(eval(`/${F.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&')}/gi`),F=>[...R].map((r,i)=>/[A-Z]/i.test(f=F[i]||'')?r[`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():r).join``)

document.write([
  ["Text input", "text", "test"],
  ["tHiS Is a PiEcE oF tExT", "is", "abcde"],
  ["The birch canoe slid on the smooth planks", "o", " OH MY "],
  ["The score was 10 to 5", "10", "tEn"],
  ["I wrote my code in Brain$#@!", "$#@!", "Friend"],
  ["This challenge was created by Andrew Piliser", "Andrew Piliser", "Martin Ender"],
  ["John does not know", "John Doe", "Jane Doe"],
  ["Glue the sheet to the dark blue background", "Glue the sheet to the dark-blue background", "foo"],
  ["aaa", "aa", "b"],
  ["aaaa", "aa", "a"],
  ["TeXT input", "text", "test"],
].map(a=>F(...a)).join('<br>'))

/*
(T,F,R)=>T.replace(
 eval(`/${F.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&')}/gi`),
    //F=>eval("for(i in R)r+=(f=F[i])&&/[A-Z]/i.test(f)?R[i][`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():R[i];r",r='')
 //F=>[...R].map((r,i)=>(f=F[i])&&/[A-Z]/i.test(f)?r[`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():r).join``
    //F=>[...R].reduce((s,r,i)=>s+(f=F[i])&&/[A-Z]/i.test(f)?r[`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():r,'')
    F=>[...R].map((r,i)=>/[A-Z]/i.test(f=F[i]||'')?r[`to${f>'`'&&f<'{'?'Low':'Upp'}erCase`]():r).join``
)*/

Less golfed:
(T,F,R) => T.replace(
    eval(`/${F.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&')}/gi`),
    F=>[...R].map((r,i) =>
        /[A-Z]/i.test(f = F[i] || '')
            ? r[`to${
                f > '`' && f < '{'
                    ? 'Low'
                    : 'Upp'
                }erCase`]()
            : r
    ).join``
)

47 bytes came from this regex escape function since the program has to handle symbols. :(

Python 3, 183 bytes
import re
j="".join
f=lambda T,F,R:j((p,j((y,(y.lower(),y.upper())[x<'a'])[x.isalpha()]for(x,y)in zip(p,R))+R[len(F):])[i%2>0]for i,p in enumerate(re.split('('+re.escape(F)+')',T,0,2)))

Try it online!
re.split + keep all even elements and replace all the odd elements by the correct transformation of the replacement string:
>>> re.split("(is)","tHiS Is a PiEcE oF tExT",0,2) # 2=re.IGNORE_CASE
['tH', 'iS', ' ', 'Is', ' a PiEcE oF tExT']

C# (Mono C# compiler), 241 bytes
using System.Text.RegularExpressions;
class Program {
static void Main(string[] args) {
r("Text input","text","Test");
}
static void r(string v,string i,string u)
{
System.Console.WriteLine(Regex.Replace(v,i,u,RegexOptions.IgnoreCase));
}
}

Try it online!

Welcome to PPCG! You can remove quite a bit of whitespace here, and actually you need to either take the inputs as arguments or input (coding them in is forbidden) or you could actually just include the function; you don't even need the Action<string,string,string> r = part

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Prime Up your code
Input
no input for this challenge
The Challenge
Write a code that outputs:
The first 10 prime numbers whose sum of their digits equal the number of bytes of your code

Examples
Let's say your code is Co&%423@k"oo" which is 13 bytes
your code must output [67, 139, 157, 193, 229, 283, 337, 373, 409, 463]
those are the first 10 prime numbers whose sum.... ok you got it!
If your code is 8 bytes, you must output [17, 53, 71, 107, 233, 251, 431, 503, 521, 701]
Rules
You must only use the first 10^8 prime numbers
which means all your numbers must be <2038074743=10^8th prime
If you can't find 10 prime numbers in this range that fit your bytes, then you will have to adjust your code (you may even have to add some bytes!) in order to find a "working number of bytes"
Just output the 10 primes in any way you like
This is code-golf, so the shortest code in bytes win!

Can't edit comment so I'm just deleting and reposting:
Here's a gist containing the primes you'd need to output for a given bytecount as well as their indices: link Since I did it naïvely, I only checked for the sums up to the first 10^7 primes.
Like some answers have mentioned, there are missing values which likely correlate to unachievable digital sums, though for larger sums this may not be the case (remember, I only checked the first 10^7 primes).

"in any way you like": do the primes need to be ordered?

@Arnauld No, but they must be the 10 smaller in any order

@cole It's definitely impossible for all the missing numbers up through 69. There aren't 10 primes in the first 10^8 that sum up to 2, and there are no primes whose digits add up to any number divisible by 3 (except for 3 itself) since then that number would be divisible by 3.

"You must only use the first 10^8 prime number, which means all your numbers must be <2038074743=10^8th prime" I guess this invalidates my 364 bytes Java answer. xD Not that it returns 10 primes which digits are equal to 364 even if it has a year to run anyway..

@KevinCruijssen   Although your answer is invalid you are welcome to post it in order to have a discussion with other members to help you find a better one.

Why the arbitrary cutoff? "You must only use the first 10^8 prime numbers" effectively means "your program must be <=79 bytes" and that's not a normal codegolf restriction. What other purpose or reason is there for it?

@TessellatingHeckler do you think you can verify a 350 bytes answer? The task is very easy and can be done in a few bytes. I think the real challenge is to get to 5 or 4. If your language can't do this task in 80 bytes then you should try another language. or try hardcoding!

@TessellatingHeckler how about 1350 bytes then?Just a question: how many bytes is your answer?

@TessellatingHeckler I also think the 10^8 cutoff is rather arbitrary. To verify that ten given numbers all have digit sum 350, and all are primes, should be fast. However, to verify that those ten are in fact the smallest possible, could be harder, I guess.

@BillSteihn I stopped trying because of the cutoff, so I don't know how long. I answered 71 bytes of V instead.

@JeppeStigNielsen Good point. With PrimeSieve generating primes, I wrote this Python script to sum the digits and find the first ten primes for each sum. The question's cutoff is 2 billion for 79 code characters. By 3 billion it's 80 chars. 4 billion, still 80. By 10 billion it's up to 86. By 20 billion, 88 chars. Here is the prime lists for up to 88 chars. clearer now that high sums will end up being 'remove repeating 9s'

For the record, up to 100 billion gets to 95 chars -
https://gist.github.com/anonymous/cb500b6a7dfc114df89e54941797ab0b

Neim, 10 8 7 bytes
-1 byte thanks to ASCII-only.
πᛦΛ7

Try it online!
Outputs:
[7 43 61 151 223 241 313 331 421 601]

This (well, at least the approach) is ungolfable.
Explanation
πᛦΛ7

π        push 13 (yes, very unintuitive :P)
 ᛦ       square (13² = 169)
        push the first 169 primes
   Λ     filter those that when the following are executed, evaluate to 1
        sum its digits and...
     7  check for equality against 7

best so far..!!!

νᛦΛ7 for 7... edit: π -> ν :p

@JonathanAllan It seems you have been ninja'd by ASCII-only. ;)

Wow there is really an instruction to push the first n primes? Neat!

Jelly, 14 bytes
‘ÆNDS=14ø⁵#‘ÆN

Try it online!
This prints:
[59, 149, 167, 239, 257, 293, 347, 383, 419, 491]

How it works
‘ÆNDS=14ø⁵#‘ÆN
          #     Count the first
         ⁵        10
                Non-negative integers which meet:
‘ÆN               the (z+1)-th prime  (1-indexed :*()
   D              digits
    S             sum
     =            equals
      14          14
           ‘ÆN  Get those primes

get those primes!

Pyth, 14 bytes
.f&qsjZT14P_ZT

Try it here.
This is 14 bytes and prints:
[59, 149, 167, 239, 257, 293, 347, 383, 419, 491]

Pyth, 16 bytes
.f&qssM`Z16P_ZTZ

Try it here!
Note that this could be 15 bytes: .f&qssM`Z16P_ZTZ, but there are no primes that have 15 as the sum of their digits, since 15 is divisible by 3, which would imply the number would also be divisible by 3, hence not being prime.
This is 16 bytes long and prints:
[79, 97, 277, 349, 367, 439, 457, 547, 619, 673]

How?
Explanation 1
.f&qsjZT16P_ZT - Full program.

.f&           T  - First 10 numbers that satisfy the following:

           P_Z     - Are prime and
    sjZT           - And their sum of digits
   q     14        - Equals 14.

Explanation 2
.f&qssM`Z16P_ZTZ - Full program.

.f&           T  - First 10 numbers that satisfy the following:

           P_Z     - Are prime and
    ssM`Z          - And their sum of digits
   q     16        - Equals 16.

Well done! and quick!

“very few prime integers that have 15 as the sum of their digits” — indeed, because a digit sum divisible by 3 implies divisibility by 3 :)

@Lynn Oh sure >_> - I'm dumb, sorry. Fixed

Jelly,  14  13 bytes
DS⁼13
.ȷÆRÇÐf

Try it online!
How?
DS⁼13 - Link 1, test digit sum equals thirteen: number, n
D     - get a list of the decimal digits of n
 S    - sum them
  ⁼13 - equals thirteen?

.ȷÆRÇÐf - Main link: no arguments
.ȷ      - literal 500
  ÆR    - prime range (all primes less than or equal to 500)
     Ðf - filter keep if:
    Ç   -   call last link (1) as a monad

Husk, 13 bytes
↑10fȯ=13ΣdfṗN

Try it online!
Explanation
            N    Take the (infinite) list of all natural numbers.
          fṗ     Select only the primes.
   fȯ            Filter again by the result of composing the following three functions:
         d         Get the decimal digits.
        Σ          Sum them.
     =13           Check whether the sum equals 13.
↑10              Take the first 10 primes in the result.

Almost golfed it to 10 bytes, but one of the results is wrong :( https://tio.run/##yygtzv7//1HbREODtPxDyywftU04sqHg/38A

@Leo Heh, would be very neat if that worked :)

Haskell, 77 71 bytes
x=take 10[i|i<-[1..],sum(read.pure<$>show i)==71,all((>0).rem i)[2..i-1]]

Try it online!
Saved 6 bytes thanks to Laikoni
For 71 bytes:
[89999999,99899999,99998999,99999989,189989999,189998999,189999989,197999999,199898999,199979999]

all your numbers must be <2038074743

1999999999 is the number with the maximum sum of digits in the allowed range, and that sum is 82. Any program that is beyond 82 bytes will not satisfy the condition. I hope that 77 bytes is ok, but I don't know (it's still running on my computer).
EDIT: a slightly optimized version gave for 77 bytes:
[699899999,779999999,788999999,789999989,797999999,798899999,799898999,799899899,799999799,879999899]

Brachylog, 13 bytes
{.≜ṗẹ+13∧}ᶠ¹⁰

Try it online!

05AB1E, 10 bytes
83LØʒSOTQ}

Try it online!
The } is used as a filler, since 9 is an invalid byte count.
Output: [19, 37, 73, 109, 127, 163, 181, 271, 307, 433]
Explanation
83L        Push array [1, ..., 83], since 433 is the 83rd prime
   Ø       Map each to the nth prime
    ʒ      Get elements that return 1
     SO     When the sum of the digits
        Q   Equals
       T    10

Almost 8 bytes
This would be valid if one more byte could be golfed off.
žyLØʒSO8Q

Try it online!
Output: [17, 53, 71, 107, 233, 251, 431, 503, 521, 701]
Explanation
žy          Push number 128, since 701 is the 125th prime
  L         Push array [1, ..., 128]
   ØʒSO8Q   Map to nth primes and filter to those with a digit sum of 8 (see above)

Mathematica, 52 bytes
Select[Prime@Range[10^6],Tr@IntegerDigits@#==52&,10]

{799999,998989,999979,1789999,1798999,1979899,1989979,1997899,1999969,2599999}

thanx to @Not a tree for -6 bytes

You can tell Select how many things you want to return: Select[Prime@Range[10^6],Tr@IntegerDigits@#==52&,10]

Select[Prime@Range[77705],Tr@IntegerDigits@#==50&]

V, 73 71 bytes
i8aa9
998a99
a98a
aa89
18998a9
18a8a
18a9989
197aa
199898a
1a7a9Ía/999

Try it online!
Simple substring replacement compression - I checked all the possible answer outputs, and then did some "which one has a simple string replacement that saves most characters" testing. e.g. generating this table. [edit: I looked again at the table and saw I could do the 71 byte version instead].
The higher primes have more long runs of 9 in them, and the best I found was where the digits add up to 73, the pattern 89999 -> 1 char brings the text down from 99 bytes to 63 bytes. Finding a way to undo 'a' -> '89999' in the remaining 10 bytes led me to V.

J, 29 bytes
(#~(29=[:+/"."0@":)"0)p:i.872

Try it online!
Definitely works on the REPL, probably works a regular program too (not sure how J does output for programs to be honest).
First pass, not particularly ideal but I can't think of any more clever approaches. Going to investigate hardcoding a smaller sequence.
Explanation
(#~(29=[:+/"."0@":)"0)p:i.872
                      p:i.872  First 872 primes
 #~                            Filter by
   (29=[:+/"."0@":)"0            Digital sum = 29
                   "0              For each
                ":                 Convert to string
           "."0                    Convert each character to a number
         +/                        Sum results
    29=                            Equate to 29

872 guarantees that only the first 10 primes whose digital sum is 29 will be used.

Ruby 2.4.1, 74 Bytes
I was never going to beat one of the Codegolf optimised languages, but it was still fun to do it in Ruby.  Frustrating that Prime is not in Core but in instead in the standard library.  I am also frustrated that I can't beat Haskell.
2.4.1 :014 > require'prime';2.step.lazy.select{|n|n.digits.sum==74&&n.prime?}.first(10)
=> [389999999, 398999999, 498989999, 498998999, 499898999, 499899989, 499979999, 499989989, 579989999, 588999899]

PARI/GP, 40 bytes
select(x->sumdigits(x)==40,primes(8600))

Not much golf about it (select those x with sum of digits 40 among first 8600 primes). Output is:
[49999, 68899, 69997, 77899, 78889, 78979, 79699, 79987, 85999, 88789]

Pyke, 10 bytes
~p#.cTq)T>

Try it here!
~p         -   primes
  #.cTq)   -  filter(^)
   .c      -    digit_sum
     Tq    -   ^ == 10
        T> - [:10]

Japt, 19 bytes
AÆ_j ©19¥Zì x «X´}a

Try it online! with the -Q flag to format the array.
Outputs the first 10 primes whose digits add to 19:
[199, 379, 397, 487, 577, 739, 757, 829, 883, 919]

Note that this could be golfed to 18 bytes (ì x → ìx), but no primes with a digit sum of 18 exist.
Explanation
AÆ

Map the array [0, ..., 9] by the following function, where X is the current value.
  _              }a

Return the first integer that returns true from the following function, where Z is the current value
   j ©

Check if this number is prime, and...
      19¥Zì x

The sum (x) of the digits (ì) in Z equals (¥) 19,
              «X´

And X is falsy (« is "and not", or &&!). This also decrements X (´).
Resulting array is implicitly outputted.

Oh, nice; we tied with different approaches.

Japt, 19 11 bytes
Would be 12 if not for a bug in Japt's j function method, which would have necessitated padding it out to 13 as there are no primes with a digit sum of 12.
Èj «BaXìx}j

Test it
Èj «BaXìx}j
È               :Function taking an integer X as argument
 j              :  Is prime?
   «            :  Logical AND with logical NOT of
    B           :    11
     a          :    Absolute difference with
      Xì        :      Digit array of X
        x       :      Reduced by addition
         }      :End function
          j     :Get the first 10 integers >=0 that return true

Ruby -rprime, 49 bytes
p  *Prime.lazy.select{_1.digits.sum==49}.take(10)

Attempt This Online!

you have a double space.

@Steffan Yep. There aren’t 10 primes with a digit sum of 48 that are computable in a reasonable time so I had to eat the byte and go with 49.

Vyxal, 8 bytes
æ*∑8=)₀ȯ

Try it online!

Bubblegum, 37 bytes
00000000: 0dc6 3901 4031 0c80 5043 9dfe 9180 7f63  ..9.@1..PC.....c
00000010: 6579 f028 9ed7 352d e7a3 4f48 37ff 9164  ey.(..5-..OH7..d
00000020: 4c96 04f7 02                             L....

Try it online!
Output is 29989,39799,39979,48799,48889,49789,56989,58699,58789,58897

Paradoc (v0.2.7+), 10 bytes (CP-1252)
5h¶fφTBŠT=

Try it online!
5h         .. 5 hundred
  ¶        .. Check if a number is prime...
   f       .. ...filter by the preceding block; converts 500
           .. to the range [0, 1, ..., 499]
    φ      .. Filter by the following block:
     T     .. Ten
      B    .. Base; convert to base-10 digits
       Š   .. Sum, resulting in the digit sum
        T  .. Ten
         = .. Check if (the digit sum and ten are) equal

Somewhat questionable since it prints all the numbers with no separator between them. An 11-byte program that prints each number on a separate line:
nIè¶fφTBŠE=

The only thing worth mentioning about it is the upper bound that's slightly more difficult to construct: Iè is 18² = 324.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Uncomment a COBOL program!
COBOL is a very old language, at the time of writing it is 58 years old.
It is so old, in fact, that it has a very interesting quirk: the first six characters of each line are comments.
Why is this, you ask? Well, those 6 characters were intended to be used as line numbers, back in the day where programs weren't completely digital and typed out on a computer.
In addition, the seventh character could only be part of a very small set (it is usually * to comment out the line or a space to separate the line number from the code)
But what if you're on a more digital system, and you just want the raw program?
The comment system
There are two types of comments in COBOL: line comments and the aforementioned "line number" comments.
Uncommenting line numbers is simple: just take the first seven (six plus a single space) characters off each line.
000000 apple
000001 banana
celery donuts

would become:
apple
banana
donuts

Line comments make it a bit more difficult.
A line comment is started with an asterisk * placed in the seventh character position on the line, like so:
000323* this is a comment

This is not a line comment:
*00000 this isn't a comment

To uncomment a line comment, just remove the whole line.
An example commented "program":
000000 blah blah
000001* apples
000002 oranges?
000003* yeah, oranges.
000*04 love me some oranges

The uncommented version:
blah blah
oranges?
love me some oranges

In other words, to uncomment a string, remove the first six characters of each line, then return all but the first character of every line that does not begin with a star.
The challenge
Create a program or function that takes a commented program and returns its uncommented variant.
Clarifications

Asterisks (*) will never be found anywhere outside the first seven characters on a line (we're not asking you to verify syntax)
Each line will always have at least 7 characters.
You may assume the seventh character is always an asterisk or a space.
Input or output may be a matrix or list.
Only printable ASCII characters (plus newline) must be handled.
You may output with a trailing newline. You may also assume that the input will have a trailing newline, if you so choose.

Scoring
Since this is code-golf, the answer with the least bytes wins!
DISCLAIMER: I do not actually know COBOL and do not claim to. If any of the claims about COBOL I have made in this question are incorrect, I take no responsibility.

Line numbers are not comments. They are a column. Terminology please.

Your examples all have a space after the *. Is this a coincidence?

@Neil Yes, it is. The eighth character can be anything.

Old does not automatically imply bad.  I have worked in an Agile COBOL shop.  They could do things on the AS/400 we could not do in Java.

Heh... I actually wrote a COBOL CopyBook parser that only works if the fields aren't packed. Just transforms it into JSON key:{key:{key:length,key:length}}. Strips all formatting data and typing data though.

Can there be a space in the first 6 characters?

Are you assuming no wholly blank lines (just carriage returns)?  I feel like that is something that'd be legal and important, but would force people to do a few more null-checks.

Can you assume that at least one line is not a line comment?

@stanri Yes, there can be.

@SouthpawHare An empty line would violate the rule that there will always be at least 7 characters in a line. Empty lines do not have to be handled.

@betaveros You cannot.

Would it be OK to have the input as an array where the last entry is something like NULL, to indicate end of input? e.g. char** program = { "000000 hello", "000001 world", NULL };

@gurka Sure, that's OK.

@EJP So true. Those of us who actually used punched cards had a strange fondness for our COBOL compilers which strictly enforced the ascending line numbers.

Is the line number significant, since it defines the order of program lines in COBOL?

@Kwebble It is not significant.

Column 7 in addition to a space, could also contain not only * (asterix) a comment but also - (hyphen) indicating a continuation line and / (forward slash) form feed

@ClickRick Sure. I built one. Well it was an option.

COBOL (GnuCOBOL), 191 + 17 = 208 bytes
I "learned" COBOL for this answer, so it's probably not fully golfed.
This is a full program, taking input on what I presume to be standard input and writing to what I presume to be standard output. Perhaps one day I'll return to this and (1) determine whether COBOL has functions and, if so, (2) see whether a function solution would be shorter.
Byte count includes program and compiler flags (-free and -frelax-syntax).
program-id.c.select i assign keyboard line sequential.fd i. 1 l pic X(80). 88 e value 0.open input i perform until e read i end set e to true end-read if not e and l(7:1)<>'*'display l(8:73).

Try It Online
Ungolfed program
program-id. c.

select i assign to keyboard organization line sequential.

fd i.
    1 l pic X(80).
    88 e value 0.

open input i
perform until e
    read i
        end set e to true
    end-read
    if not e and l(7:1) <> '*'
        display l(8:73).

Limitations
The output is, technically speaking, not correct. From my cursory research, it seems the only practical way to store a string in COBOL is in a fixed-size buffer. I have chosen a buffer size of 80 characters, since this is the line length limit for fixed-format programs. This presents two limitations:

Lines longer than 80 characters are truncated.
Lines shorter than 80 characters are right-padded with spaces.

I'm guessing this is acceptable since, well, it's COBOL. If not, I'd be willing to look into alternatives.
Acknowledgments

-166 bytes thanks to Edward H
-2 bytes thanks to hornj

Asterisks (*) will never be found anywhere outside the first seven characters on a line ... and yet ... ;)

@Cœur Haha yes...but my solution doesn't use that assumption, so maybe it's appropriate!

You win one internet.

@Cœur except in a COMPUTE statement.

I think you can remove the program-id. c..

@Kwebble Doesn't work in TIO with the current setup.

Congratulations on your gold badge!

Python 2, 39 38 37 bytes
-1 byte thanks to LyricLy. -1 byte thanks to Mego.
lambda s:[i[7:]for i in s if'*'>i[6]]

Try it online!
I/O as lists of strings.

Save a byte by replacing != with <, since a space's code point is lower than an asterisk's one, and the seventh character will always be a space or an asterisk.

So, the 7th character will always be a space or an asterisk?

Yes. You may assume the seventh character is always an asterisk or a space.

Save 1 byte with if'*'!=i[6]

Perl 5, 19 + 1 (-p) = 20 16 bytes
-4 bytes with Pavel's suggestions
s/.{6}( |.*)//s

Try it online!

You can save three bytes if you replace (\*.*$| ) with ( |.*)

Not as short as @Pavel's comment, but / /;$_=/\* /?$,:$' is another alternative

You also don't need the ^.

V, 13 11 10 bytes
Î6x<<
çª/d

Try it online!
Explanation
Î       ' On every line
  x     ' delete the first...
 6      ' 6 characters
   <<   ' and unindent the line (removes the leading space)
ç /     ' on every line
 ª      ' matching \*
   d    ' delete the line

Hexdump:
00000000: ce36 783c 3c0a e7aa 2f64                 .6x<<.../d

Couldn't you do 7x instead of 6x<<?

Then it deletes the *

Would it work to delete the lins with * first and then do Î7x ? (assuming a * can not not in the chars 0-5)

@12431234123412341234123 unfortunately no, because there can be a * in the first 6 characters.

Paradoc (v0.2.8+), 8 bytes (CP-1252)
µ6>(7#;x

Takes a list of lines, and results in a list of uncommented lines.
Explanation:
μ        .. Map the following block over each line (the block is terminated
         .. by }, but that doesn't exist, so it's until EOF)
 6>      .. Slice everything after the first six characters
   (     .. Uncons, so now the stack has the 6th character on top
         .. and the rest of the line second
    7#   .. Count the multiplicity of factors of 7 in the character
         .. (treated as an integer, so '*' is 42 and ' ' is 32)
      ;  .. Pop the top element of the stack (the rest of the line)...
       x .. ...that many times (so, don't pop if the 6th character was a
         .. space, and do pop if it was an asterisk)

Hi, I wrote a golfing programming language. :)
I'm still developing this and added/tweaked a bunch of built-ins after trying to write this so that there are more reasonable ways to differentiate between a space and an asterisk than "7#", but I feel like that would make this noncompeting. It's fortunate that it still worked out (this only uses features from v0.2.8, which I committed three days ago).

"Hi, I wrote a golfing programming language." Was the version you're using released before or after this challenge was posted?

It works on this version from three days ago: https://github.com/betaveros/paradoc/releases/tag/v0.2.8

Right, you mentioned that, but somehow it didn't register explicitly...

@Mast It doesn't really matter.

Octave, 23 bytes
@(s)s(s(:,7)~=42,8:end)

Try it online!

I never knew Octave could do strings like that... Take that, MATLAB. xD

Since R2016b's introduction of string arrays, I'm pretty sure this would work in MATLAB too @Sanchises! I only have access to R2015b currently so can't confirm though. MATLAB can do it in 74 bytes, probably fewer @(s)cellfun(@(r)r(8:end),s(cellfun(@(r)r(7)~=42,s)),'uniformoutput',false), where s is a cell array, not a string array. Using regexp or something would likely be shorter, but the method I've written is comparable to the methodology in this answer just for old MATLAB

Jelly, 11 9 bytes
ṫ€7Ḣ⁼¥Ðf⁶

Try it online!
Inputs and outputs as a list of lines.
-2 bytes thanks to @EriktheOutgolfer and @JonathanAllan
How it works
ṫ€7Ḣ=¥Ðf⁶
 €           On each line:
ṫ 7            Replace the line with line[7:]
      Ðf     Keep all lines that meet condition:
     ¥         Dyad:
   Ḣ             First Element (modifies line)
    =            Equals
        ⁶    Space

7$€ can be €7

take it down to 9 like so: ṫ€7Ḣ⁼¥Ðf⁶

Vim, 14 bytes
Ctrl-VG5ld:%g/\*/dEnter
Loading the input file as the buffer to edit, then enter the above commands. Output is the new buffer.

PowerShell, 32 bytes
$input-replace'^.{6}( |.*)'-ne''

Try it online!
Pipeline input comes in as an array of strings, -replace works on every string, and -ne '' (not equal to empty string) applied to an array, acts to filter out the blank lines.

Pyth, 9 bytes
Note that this only works if at least 1 line is not a comment and at least 1 line is a comment. All the other solutions work in all cases.
-2 bytes thanks to @pizzakingme!
m>d7.m@b6

Try it here!
Explanation
m>d7.m@b6     - Full program with implicit input. Takes input as a list of Strings.

m>d7          - All but the first 7 letters of
    .m   (Q)  - The input, filtered for its minimal value using the < operator on
      @b6     - the 7th character -- note that "*" is greater than " "
              - Implicitly Output the result.

Pyth, 11 bytes
tMfqhTdm>d6

Try it here!
Explanation

tMfqhTdm>d6 - Full Program with implicit input. Takes input as a list of Strings.

       m>d6 - Remove the first 6 characters of each line.
    hT      - Get the first character of each.
  fq  d     - Keep those that have the first character an asterisk.
tM          - Remove the first character of each.
            - Output Implicitly.

Pyth, 11 bytes
m>d7fqd@T6Q

Try it here!
Explanation

m>d7fq@T6dQ  - Full program. Takes input as a list of Strings.

      @T6    - The sixth character of each.
    fq   dQ  - Keep the lines that have a space as ^.
m>d7         - Crop the first 7 characters.
             - Output implicitly.

Pyth, 12 bytes
tMfnhT\*m>d6

Try it here!
Explanation

tMfnhT\*m>d6 - Full Program with implicit input. Takes input as a list of Strings.

        m>d6 - Remove the first 6 characters of each line.
    hT       - Get the first character of each.
  fn  \*     - Filter those that aren't equal to an asterisk.
tM           - Remove the first character of each.
             - Output Implicitly.

Pyth, 12 bytes
m>d7fn@T6\*Q

Try it here!
Explanation

m>d7fn@T6\*Q  - Full program. Takes input as a list of Strings.

      @T6     - Get the sixth character of each string
    fn   \*Q  - And filter those that aren't equal to an asterisk.
m>d7          - Crop the first 7 characters.
              - Output implicitly.

"Keep those that have the first character an asterisk." I think you meant "Keep those of which the first character is NOT an asterisk."

m>d7.m@b6 should work at 9 bytes, abusing that * is after space in lexicographical order

I can edit it in with explanation / test link if you want!

@pizzakingme I'd be glad if you would edit in, because I am on mobile. Thanks a lot and don't forget to credit yourself for the new solution!

Does this work if all lines are line comments? (I'm not sure if you have to handle this case)

@betaveros All the solutions except for the 9-byter work in that case. I will add the remark.

C, 63 59 55 48 47 46 bytes
Thanks to "an anonymous user" for getting rid off yet another byte.
Thanks to Felix Palmen for reminding me of "You may assume the seventh character is always an asterisk or a space.", which shaved off one more byte.
f(char**a){for(;*a;++a)(*a)[6]&2||puts(*a+7);}

Use like:
char** program = { "000000 apple", "000001 banana", "celery donuts", 0 };
f(program);

Try it online!

44 bytes

C (gcc), 53 48 46 bytes
x;main(y){for(y=&x;gets(y-6);x&2||puts(y+1));}

Try it online!
-5 bytes: It was very tricky to get this "whole program" down to the same size as gurka's function. It's now writing out of bounds (in both directions) of an array of wrong type and relies on little endian and 4 byte integers to find the asterisk ... but hey, it works ;)
-2 bytes: Well, if we already write to some "random" .bss location, why bother declaring an array at all! So here comes the string handling program that uses neither the char type nor an array.

Nice! And the *x&2 made me remember "You may assume the seventh character is always an asterisk or a space.", so I should be able to shave some bytes off my answer :-)

@gurka thanks :D -2, hehe

SNOBOL4 (CSNOBOL4), 72 70 66 50 bytes
R	INPUT POS(6) (' '  REM . OUTPUT | '*') :S(R)
END

Try it online!
Pattern matching in SNOBOL is quite different from regex but the idea here is still the same: If a line matches "six characters and then an asterisk", remove it, otherwise, remove the first seven characters of the line and print the result.
This now actually takes better advantage of SNOBOL's conditional assignment operator.
The pattern is POS(6) (' ' REM . OUTPUT | '*') which is interpreted as:
Starting at position 6, match a space or an asterisk, and if you match a space, assign the rest of the line to OUTPUT.

Java 8, 40 bytes
Regular expressions: just about, but not quite, the wrong tool for the job. Lambda from String to String (assign to Function<String, String>). Input must have a trailing newline.
s->s.replaceAll("(?m)^.{6}( |.*\\n)","")

Try It Online
Acknowledgments

-3 bytes thanks to Sven Hohenstein's regex

The right tool! :)

GNU Sed, 19 + 2 = 21 characters
Requires -E argument to sed to enable extended regular expressions.
/^.{6}\*/d;s/^.{7}/

you could do the same thing as the perl guy, s/^.{6}( |.*)//g

which version of sed ignores absense of replacement substring for s command?

Ruby, 39 38 36 29 23 22 20 + 1 = 21 bytes
$_[/.{6}( |.*
)/]=''

Try it online!
Uses -p flag.
Explanation:
The -p flag adds an implicit block around the code, so the code that actually gets run looks like this:
while gets
    $_[/.{6}( |.*
)/]=''

    puts $_
end

gets reads a line of text and stores its result in $_.
$_[/.../]='' removes the first occurence of the regex ... in $_.
/.{6}( |.*\n)/ matches 6 of any character at the start of a line, followed by either a space or the rest of the line. Because the space appears first, it will try to remove only the first 6 characters and a space before attempting to remove the entire line.
$_ is then printed out, and this process is repeated for each line.

Method calls in Ruby don't need parentheses, removing them will save you a byte.

Actually, 13 bytes
⌠6@tp' =*⌡M;░

Input and output is done as a list of strings.
Explanation:
⌠6@tp' =*⌡M;░
⌠6@tp' =*⌡M    for each line:
 6@t             discard the first 6 characters
    p            pop the first character of the remainder
     ' =         is it a space?
        *        multiply the string by the boolean - returns the string if true, and an empty string if false
           ;░  filter out empty strings

Try it online!

Gaia, 9 bytes
6>¦'*«⁈ḥ¦

A function accepting a list of strings and returning a list of strings.
Try it online!
Explanation
6>¦        Remove the first 6 characters of each string
   '*«⁈    Filter out ones that start with *
       ḥ¦  Remove the initial space from each

I count ten characters, and since three are non-ASCII, do they not take more than a byte?

@WGroleau ⁈ and « are both 1 character. Out golfing languages that use non-ascii character (maybe except for Neim) use custom encodings, that allow all those non-ASCIIs to be counted as single bytes. Here is Gaia's code page.

@Mr.Xcoder Neim has an encoding too.

R, 47 45 bytes
function(x)gsub("(?m)^.{6}( |.*\\n)","",x,,T)

If you take the input as a list of strings I think you can shorten the regex to "^.{6}( |.*$)" for -6.

@CriminallyVulgar Correct. In this case, I could also drop the pe=T argument. However, I am not sure whether input as a list of strings is allowed.

From the OP: Input or output may be a matrix or list.

@CriminallyVulgar The problem is the presence of empty strings in the output.

@SvenHohenstein Ah of course, I hadn't considered that.

@Giuseppe Thanks for the hint.

Haskell, 27 25 bytes
Laikoni's version is shorter than mine:
f n=[x|' ':x<-drop 6<$>n]

Try it online!
My version:

f n=[drop 7x|x<-n,x!!6<'*']

Try it online!

25 bytes: f n=[x|' ':x<-drop 6<$>n].

@Laikoni That's nice!! I didn't know it was possible to match patterns in a generator of a list comprehension.

APL, 23 bytes

23 bytes assuming SBCS. In UTF-8 it'll be 42 bytes

This is my first ever attempt at a code golf challenge, feel free to improve, i'm sure i could have saved one or two characters if i wasn't so adamant on making this code 'tacit'
This assumes the input is a list of lines and return a list of uncommented lines, this makes everything a bit easier since APL was explicitly made to work on list!
(('*'≠7∘⌷)⊢⍤/(8≤⍳8)∘⊂)¨

Go ahead and try it! (Thanks @Sʨɠɠan)

Welcome to Code Golf! It's typically allowed to take I/O how you did; see Default for Code Golf: Input/Output methods

You can count it as 23 bytes, as there's an SBCS (single-byte character set) to cover the set of characters: https://github.com/abrudz/SBCS

Here's a link so others can test your code: try it online!

Thanks a lot for the feedback!

><>, 57 53 Bytes
>i~i~i~i~i~i~i67*=\
<o$/?:$/?=a:;?(0:i<
\~$/~\ $
/  <o\?/

try it online
Explanation
>i~i~i~i~i~i~i67*=    Read in the first seven bytes of the line
 i~i~i~i~i~i~         Read, and discard 6 characters
             i        Read the seventh
              67*=    Check if the seventh character was an
                      asterisk (and leave that value on the stack );

<o$/?:$/?=a:;?(0:i<    Read characters until a newline or eof
                 i     Read the next character of the line
            ;?(0:      If it's a -1, terminate the program
       /?=a:           If it's a newline, break out of the loop
   /?:$                If the seventh character was not an asterisk
<o$                    Output this character
\~$/                   otherwise discard it

   /~\ $    Having reached the end of the line, output
/  <o\?/    the newline only if it was not a comment

Edit: 53 bytes
>   i~i~i~i~i~i~i67*=\
/?=a<o/?$@:$@:$;?(0:i<
~   \~/

Basically the same stuff as before, but restructured slightly
As a side note: I'm disappointed no-one's done this in cobol yet.

JavaScript (ES6), 48 bytes
s=>s.map(c=>c[6]<"*"?console.log(c.substr(7)):1)

Try it online!

This is neither a function, nor a full program as it assumes the input is stored in z, which isn't allowed here. You could however turn it into an anonymous arrow function, in order to make it valid.

@cairdcoinheringaahing you're absolutely right. Updated the solution - not sure what the rules are regarding the ( and ) surrounding the fn, added them to be sure.

You don't need the () around the function, but otherwise it looks fine.

JavaScript, 44 34 bytes
Crossed-out 44 is still regular 44.
6 bytes saved thanks to tsh
a=>a.replace(/^.{6}( |.*\n)/gm,'')

Try it online!

s=>s.replace(/^.{6}( |\*.*\s)?/mg,'')

s.match(/(?<=^.{6} ).*/mg) ESNext (Nonstandard, Stage3) Chrome62+

@tsh. Until there is a stable interpreter which allows it, I suppose it doesn't count as a valid programming language.

It doesn't seem like this gives the correct output if the last line is a comment line.

@LyricLy. It is because I assumed that input will always contain a trailing new line. You can see that it works is there is an empty line after the input. If I should not assume it, then fix will cost 1 byte (adding ? after \n).

Ah. That makes sense. Yes, assuming a trailing newline on the input is fine.

Retina, 23 15 bytes
5 bytes saved thanks to nmjcman101
1 byte saved thanks to Neil
m`^.{6}( |.*¶)

Try it online!

C#, 160 145 90 89 bytes
t=>{var o="";foreach(var s in i.Split('\n'))if(s[6]!=42)o+=s.Substring(7)+"\n";return o;}

Thanks to Pavel & auhmaan for reducing the size.

Welcome to PPCG! I would suggest adding a try it online link to your answer so that others can test your code. Besides that, great first (well, second) answer!

You can make this shorter by writing a lambda in the form t=>{...}

@LyricLy I tried doing that, actually, but for some reason, this doesn't work there. It works perfectly fine in a VS console app, though.

@Pavel Like so? I'm not sure if I did it completely correctly; I've never needed to use a lambda expression before.

Yes, exactly. You can test it by assigning it to a func<string, string>.

You can make it 90 bytes long: i=>{var o="";foreach(var l in i.Split('\n'))if(l[6]!=42)o+=l.Substring(7)+"\n";return o;};

Why is there a trailing semicolon outside the lambda body?  This is not a statement.  It can only possibly be an expression.

delegate string y;y s=[my code...] This requires a semicolon after it and that is how I tested it. The semicolon is a remnant of testing.

Pyke, 9 bytes
36 4C 3E 23 64 DE 29 6D 74

Try it here!
Readable:
6L>#d.^)mt

Try it here!
6L>        -   [i[6:] for i in input]
   #d.^)   -  filter(i.startswith(" ") for  i in ^)
        mt - [i[-1:] for i in ^]

Python 3, 62 bytes (no regex)
def f(s):
 for w in s.split('\n'):
  if w[6]!='*':print(t[7:])

It works!
>>> s="""000000 blah blah
000001* apples
000002 oranges?
000003* yeah, oranges.
000*04 love me some oranges"""
>>> f(s)
blah blah
oranges?
love me some oranges

Zsh (builtins only), 35 bytes
for l ("${(f)$(<p)}")<<<${l:7$l[7]}

Try it Online
Scans file p per this tip.
Other solutions: 45 bytes, 27b (illegal)

Aren't you supposed to input EVERY line of COBOL program, not a line of?

Ah, good point... will need to work on it again!

sed, 11 bytes + 3 bytes option -nr = 14 bytes.
s/^.{6} //p

Try it online!
sed, 16 bytes
#n
s/^.\{6\} //p

Try it online!
#n on top of line is for -n, which is GNU-extension POSIX-compatible.

CLC-INTERCAL, 116 bytes.
DO;1<-#6DO,1<-#999DOCOMEFROM.1DOWRITEIN;1+,1(91)DO.1<-,1SUB#2(1)DO.2<-.1~#1DDOCOMEFROM.2DO,1SUB#3<-#0(95)DOREADOUT,1

Try it online, although you need to copy and paste!
Assumption

Each line should have <=80 characters except trailing newline character(s), although this program can handle up to 339 characters per line (or more, depending on what kind of characters are used).
Does not matter whether input has trailing newline or not.

Explaination
DONOTE stores first six characters of line
DO;1<-#6
DONOTE stores rest of characters of line except trailing newline
DO,1<-#999
DONOTE label one
DOCOMEFROM.1
DOWRITEIN;1+,1
DONOTE goto label one if tail one is asterisk
DONOTE first two items of tail one shall be
DONOTE 91 and 95 if space, or
DONOTE 91 and 95 if asterisk
(91)DO.1<-,1SUB#2
DONOTE goto label two if line is not empty
DONOTE obtw every item of tail will be zero
DONOTE if empty line
(1)DO.2<-.1~#1
DONOTE die here
D
DONOTE label two
DOCOMEFROM.2
DONOTE erase the space
DONOTE obtw zeros on tail are ignored
DONOTE when reading out
DONOTE see source code for more info
DO,1SUB#3<-#0
DONOTE goto label 1 after reading out
(95)DOREADOUT,1

Pure Bash, 42 + 1 = 43 bytes
Filename must be x; it is for extra one byte.
read x||>x
((1${x:6:1}1))||echo ${x:7}
. x

Try it online!
Usage

Input from stdin.
Optional trailing LFs.
Output to stdout.

AWK, 34 24 15 bytes
sub(/^.{6} /,_)

Attempt This Online!

TeX - 139 bytes
\let~\def~\a#1#2#3#4#5#6{\b}~\d#1{\catcode`#1=12}\obeylines\d\ ~\b#1#2
{\if#1*\else\write1{#2}\fi\egroup
}\everypar{\bgroup\d\\\d\{\d\}\a}

Eats up the first six characters of each line, then checks if the next one is an asterisk or something else. Recurses over lines by eating up anything that tries to get typeset. The rest of my bytes are spent on changing category codes of syntax related characters so it's robust.

Javascript, 37 bytes
Regexp-based solution
s=>s.replace(/^.{6}( |(\*.+$\n?))/gm,'')

Japt, 11 10 bytes
Takes input as an array of strings and outputs an array of strings.
k_g6 x
®t7

Test it (-R flag for visualisation purposes only)

Saved a byte thanks to ETH.

Explanation
Implicit input of array U.
f_

Filter (f) by passing each element through a function.
g6

Get the character at index (g) 6 (0-indexed).
x

Trim, giving either * (truthy) or an empty string (falsey).
®t7

Map (®) over the array and get the substring (t) of each element from the 7th character. Implicitly output the resulting array.

think the first line can be k_g6 x

@ETHproductions: Today was not a good day's golfing for me - I was playing around with solutions using x, as seen in my alt. solution, and I still didn't twig that! Thanks once again :)

05AB1E, 11 bytes
|ʒ6èðQ}ε7F¦

Try it online!

10 bytes: |ε6.$ćðQi,

@Grimy Heh, .$ didn't exist back then. :P

C++ (GCC), 121 112 bytes
Thanks to @gurka for saving 9 bytes!
#import<bits/stdc++.h>
void f(std::list<std::string>l){for(auto s:l)if(s[6]-42)std::cout<<s.substr(7,s.size());}

Takes input as a list of lines.
Try it online!

#import? Also, I think that it's OK to omit standard includes.

#import isn't standard C++, but at least GCC and MSVC support it. Omitting some includes works with C, but not with C++. The code doesn't work without the includes, so they have to be counted in the total bytecount.

Aha, I thought you could just skip includes since you don't see any import in python answers or using in C# answers. Also, wouldn't #include <bits/stdc++.h> be shorter for your answer?

@gurka Yes, it would be shorter. Thanks!

@gurka the imports are counted in Python answers, it's just that Python has a lot of functions that don't need importing. C# tends to not have using statement because it's generally shorter to write system.foo() than using system;foo()

bits/stdc++.h is not a standard header and thus is not "C++". You must specify a compiler and/or standard library implementation.

Java 8, 95 54 53 bytes
s->s.filter(x->x.charAt(6)<33).map(x->x.substring(7))

-42 bytes thanks to @OliverGrégoire, by using a Stream<String> instead of String as in- and output.
Explanation:
Try it here.
s->                          // Method with Stream<String> as parameter and return-type
  s.filter(x->x.charAt(6)<33)//  Filter out all lines containing an asterisk as 7th char
   .map(x->x.substring(7))   //  And remove the first 7 characters from the remaining lines
                             // End of method (implicit / single-line body)

Looks like you can use a String[] or List<String> as input for -12 bytes.

Or Stream<String> if that can help. Example : s->s.map(x->x.charAt(6)!=42?x.substring(7):"")

Oh, it's needed to filter... then s->s.filter(x->x.charAt(6)!=42).map(x->x.substring(7)) for 54 bytes.

@OlivierGrégoire Could you provide a TIO regarding the input? java.util.Arrays(the_string_array).stream() it should be, right?

java.util.Arrays.stream(yourStringWithNewLines.split("\n"))

Okay, you're aware of this, you're likely making the changes right now. I'll leave soon, so I can +1 before I forget. ;)

Use <42 instead of !=42 because "You may assume the seventh character is always an asterisk or a space."

@OlivierGrégoire Ah, missed that rule, otherwise I would have done so myself. Thanks for the correction.

Jq 1.5, 24 bytes
select(.[6:]<"*")|.[7:]

Explanation
  select(.[6:] < "*")          # discard if '*' in column 7
| .[7:]                        # keep remaining portion

Sample run with paste to show input vs output
$ paste input <(jq -MRr 'select(.[6:]<"*")|.[7:]' input)
000000 blah blah                blah blah
000001* apples                  oranges?
000002 oranges?                 love me some oranges
000003* yeah, oranges.
000*04 love me some oranges

$ wc -c <<<'select(.[6:]<"*")|.[7:]'
      24

Try it online

Dash, 26 bytes
cut -c7-|grep ^\ |cut -c2-

Try it online!

Dash, 29 bytes
cut -c7-|grep -vF \*|cut -c2-

Try it online!
OBTW it's POSIX-compatible, if I remember the specs correctly.

Pxem, 88 bytes (filename) + 0 bytes (content) = 88 bytes, with non-printable characters.

Filename (some unprintables are escaped): \001.t.i.m.+.w.i.s.i.s.i.s.i.s.i.s.i*.zAB.z.i.c.o\n.a\002.tXX.a.m\002.zAB.i\n.z.i\n.aXX.a\001.t.i.m.+.a
Content: empty.

Try it online!
Usage
/path/to/pxem/interpreter THAT_PROGRAM_AS_IN_ABOVE <input.txt

COBOL program to be input must be fed from stdin, with LF-styled newlines, whose last line is terminated with LF.
Alternative: Pxem, 100 bytes (filename) + 0 bytes (content) = 100 bytes, printables and LF only.
Filename is as follows:
ab.-.t.i.m.+.w.i.s.i.s.i.s.i.s.i.s.i*.zAB.z.i.c.o
.a02.-.tXX.a.mac.-.zAB.i
.z.i
.aXX.aab.-.t.i.m.+.a

Commented version
XX.z (this is just to format well
.a<0x01>.tXX.z (reg=1
.a.i.m.+.wXX.z (while getchar()!=EOF; do (obtw EOF is -1
   .a.i.s.i.s.i.s.i.s.i.sXX.z (5.times { getchar(); }
   .a.i*.zXX.z (while getchar()!='*'; do
      .aAB.z.i.c.o<0x0A>.aXX.z (do print(c=getchar()) while c!=newline
      .a<0x02>.tXX.z (reg=2
   .aXX.aXX.z ( break; done
   .a.m<0x02>.zXX.z (while reg!=2; do
      .aAB.i<0x0A>.z.i<0x0A>.aXX.z (do c=getchar() while c!=newline
   .aXX.aXX.z ( break; done
   .a<0x01>.tXX.z (reg=1
.a.i.m.+.aXX.z (done
.a

GFortran, 84 bytes
Try it Online!
Yet again, Fortran beats Cobol ☺. Borrows stuff from this solution.
character(99)C;read*,n;do i=1,n;read'(A)',C
if(C(7:7)<'*')print'(A)',C(8:);enddo;end

Previously: 95 bytes ; 98 bytes(-47 by removing array) ; 145 bytes

K (ngn/k), 28 bytes
{$["*"=x@6;"";" "/1_" "\x]}'

Try it online!
Takes a list of strings and returns a list of strings.
Explanations:
{$["*"=x@6;"";" "/1_" "\x]}'  Main function. Takes implicit input
                           '  For each string in the lists...
{                         }   Execute a function that
 $[                      ]    Checks if
       x@6                    The character at the 6th position (0-indexed)
   "*"=   ;                   Is equal to an asterisk
           "";                If it does, return an empty string
                        x     Else, return the string
                    " "\      Splitted by whitespace
                  1_          Trim the first element (i.e. the line numbers)
              " "/            Join together by whitespace (to preserve the original text)

Save two byets by indexing into a list instead of $[]: tio

Scratch, 277 bytes.
define g[x
set[s v]to(
set[j v]to((x)+(1
repeat(length of(item(i)of[l v
set[s v]to(join(s)(letter(j)of(item(i)of[l v
change[j v]by(1
end
replace item(i)of[l v]with(s
define f
set[i v]to(1
repeat(length of[l v
g(6
if<(s)contains[*]?>then
delete(i)of[l v
else
g[1
change[i v]by(1

Try it on Scratch!

J, 20 bytes
7&}."1(#~'*'~:6&{"1)

This assumes the input is a matrix of equal-length space-padded lines.

PHP, 50 bytes
foreach(file(C)as$s)$s[6]>" "||print substr($s,7);

same length:
foreach(file(C)as$s)$s[6]^a^q||print substr($s,7);
foreach(file(C)as$s)$s[6]^b^x&&print substr($s,7);
foreach(file(C)as$s)echo$s[6]^b^x?substr($s,7):"";

regex solution, 51 bytes:
<?=join(preg_filter("#^.{6} (.*)$#","$1",file(C)));

builtins only, 108 bytes:
<?=join(array_map(function($s){return substr($s,7);},array_filter(file(C),function($s){return$s[6]^b^x;})));

take code from a file named C. Run with -nr or try them online.

CJam, 13 bytes
{{6>'*#},7f>}

Try it online!
Explanation:
{           }  e# Block. Input:                ["000000 blah blah" "000001* apples" "000002 oranges?" "000003* yeah, oranges."]
 {     },      e# Filter on the following:
  6>           e#   Remove first 6 characters: [" blah blah" "* apples" " oranges?" "*yeah, oranges"]
    '*#        e#   Find a '*':                [-1 0 -1 0]
               e# End filter:                  ["000000 blah blah" "000002 oranges?"]
         7f>   e# Remove first 7 characters:   ["blah blah" "oranges?"]

Implicit, 22 bytes
('\6¯_0=`*!{]\1%ß1}]^ö

No explanation, sorry. I forgot how this works.

Pyth - 15
V.z*.DNU7n@N6\*

Explanation:
V.z*.DNU7n@N6\*
V.z              For each line N in input
                  Print
     N             N
   .D U7           but with characters 0-6 removed
  *                times
          @N6       Item six of N
         n          Does not equal
             \*     "*"

Husk, 9 bytes
fo≠' ←m↓7

Try it online!
same idea as Jelly.

Excel, 40 bytes
=FILTER(MID(A:A,8,73),MID(A:A,7,1)<>"*")

COBOL has a max line length of 80.

Stax, 7 bytes
ê┬|Y¶à6

Run and debug it
Explanation
m6%B42=C
m        map each line:
 6%      split at index 6, push both parts
   B     uncons, pop and push first element
    42=C if equal to 42, cancel

C++ (gcc), 68 bytes
[](auto&l){l.remove_if([](auto&s){int c=s[6];s=&s[7];return c&2;});}

Input is a std::list<std::string>, it's modified in place.
Try it online!

Pascal, 122 B
This is a complete program requiring a processor complying to ISO standard 10206 “Extended Pascal”:
program p(input,output);var l:string(80);begin while not EOF do begin readLn(l);if''=l[7]then writeLn(subStr(l,8))end end.

Ungolfed version with some explanatory comments:
program uncommentFixedFormatCobol(input, output);
    var
        { This “discriminates” the built-in schema data type `string`
          to have a capacity of up to 80 characters, i.e. the maximum
          width of one COBOL _fixed-format_ source code line. }
        line: string(80);
    begin
        { `EOF` is shorthand for `EOF(input)`. }
        while not EOF do
        begin
            { `readLn(line)` is shorthand for `readLn(input, line)`. }
            readLn(line);
            { Similarly, `write(x)` is shorthand for `write(output, x)`. }

            { ---- Remember, in Pascal `string` indices are 1-based. ----- }
            { This may look like an empty string check, and `''` is indeed
              an empty string, yet in Pascal the `=`-comparison first pads
              both operands  to the same length using `' '`.  This line is
              in fact doing `if line[7] = ' ' then`, but one byte shorter. }
            if line[7] = '' then
            begin
                { `subStr(line, 8)` shorthand for
                  `subStr(line, 8, length(line) - 8 + 1)` }
                writeLn(subStr(line, 8))
                { Wait! What if `line[8]` does not exist? The standard
                  says it shall be an error if `firstCharacterIndex +
                  substringLength − 1` is greater than the length of the
                  supplied string. If `length(line)` equals seven, then
                  we’re calling `subStr(line, 8, 0)` which is fine. }
            end
        end
    end.

Knight (v2), 19 bytes
W=xP|?42A=xSxF6@O]x

There are a few ways to do this that all are 19 bytes, but the theoretically optimal way (= x SUBST(PROMPT 0 6 @)) suffers from keyword clashing, meaning it has to be =xS P0 6@, wasting two separators.
# for each line in stdin
WHILE (= x PROMPT)
    #  If not equal to to 42 (ASCII("*"))
    #   |    | ASCII value of first char
    #   |    |     | Strip the first 6 chars of x
    : | ? 42 ASCII (= x SUBST (x FALSE 6 @))
      # Output the tail (all but the first char) of x
      : OUTPUT (] x)

This uses the new ] and @ operators to simplify string operations, as ] replaces SxF1"" and @ replaces "" when coerced to String since empty list is empty string.
Input is in stdin, output is in stdout.
Try it online!

Pyth, 12 bytes
tMfqdhT>R6.z

Try it here.
Explanation:
tMfqdhT>R6.z | Full program
-------------+----------------------------------------
        R .z | For each line of input
       > 6   |  Remove the first 6 characters
  f  hT      | Filter over whether the first character
   qd        |  is a space
tM           | Remove the first character of each

Pure Bash, 39 bytes
Outgolfed user100411's answer
for x
{ ((1${x:6:1}1))||echo "${x:7}"
}

Attempt This Online!
Usage
Each argument represents a line. e.g.
cat<<'EOF'>f
for x
{ ((1${x:6:1}1))||echo "${x:7}"
}
EOF
bash f '000000 blah blah' '000001* apples' '000002 oranges?' '000003* yeah, oranges.' '000*04 love me some oranges'

Thunno 2 N, 10 bytes
¤æ6ið=;ı7ỵ

Attempt This Online!
Explanation
¤æ6ið=;ı7ỵ  # Implicit input
¤           # Split the multi-line input on newlines
 æ    ;     # Filter this list of strings by:
  6i        #  The 6th character (0-indexed)
    ð=      #  Is a space
       ı    # Map over this new list of strings:
        7ỵ  #  Remove the first 7 characters
            # Implicit output, joined on newlines

Erlang, 52 bytes
a(A)->[lists:nthtail(7,X)||X<-A,lists:nth(7,X)/=42].

Try it online!

sed 4.2.2, 29 bytes
/^.{6}\*.*$/d
s/^.{7}//
/^$/d

Try it online!

Rockstar, 94 bytes
listen to S
while S
cut S in N
cut S
while N-S-7
roll S in C

if C-1
join S
say S

listen to S

Try it (Code will need to be pasted in)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/