1

I have a .txt file that has stock tickers such as $AAPL, but the issue is that these tickers are stuck to other words such as "$AAPL24H" but instead I want it to be "$APPL 24H" so essentially I want python or some sort of text editor to go ahead and look at a .txt file > every time it sees the symbol "$" > it should move 4 letters > and then enter space

So that $APPL24H > turns into $AAPL 24H if that makes sense.

I have 0 programming but I was hoping you guys can hook me up with a YouTube video that would help me out here? Thanks!

Toto
  • 89,455
  • 62
  • 89
  • 125
Jake Smith
  • 23
  • 2
  • No coding is required. You just need to use replace with Regular Expressions in Notepad++. – PM 77-1 Feb 16 '22 at 22:27
  • I am not sure what to put in the "find what" section and what to put in the "replace with" maybe you can tell me? If not is their a source you can point me to? – Jake Smith Feb 17 '22 at 05:13

1 Answers1

1

Using Notepad++.

  • Ctrl+H
  • Find what: \$....
  • Replace with: $0 # there is a space after $0
  • CHECK Wrap around
  • CHECK Regular expression
  • UNCHECK . matches newline
  • Replace all

Explanation:

\$          # $ sign, have to be escaped as it has special meaning in regex
....        # 4 any character but newline

Replacement:

$0          # the whole match followed by a space

Screenshot (before):

enter image description here

Screenshot (after):

enter image description here

Toto
  • 89,455
  • 62
  • 89
  • 125