# Help with strings!

**URL:** <https://discourse.julialang.org/t/help-with-strings/31979>\
**Category:** General Usage\
**Tags:** strings, array\
**Created:** [December 7, 2019, 4:27pm UTC](https://discourse.julialang.org/t/help-with-strings/31979 "2019-12-07T16:27:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PseudoCodeNerd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pseudocodenerd/32/11948_2.png) [@PseudoCodeNerd](https://discourse.julialang.org/u/PseudoCodeNerd)\
**Post date:** [December 7, 2019, 4:27pm UTC](https://discourse.julialang.org/t/help-with-strings/31979/1 "2019-12-07T16:27:45Z")

</div>

Hello there people at Julia !  
I’m a high-school student and recently I’ve been stuck with this problem in Julia.  
I want to get the first characters of the words in a long sentence (after splitting from the blank) and concatenate them together in a new string. I’m able to make this in python though but julia string indexing is confusing me.  
Basically, like making an acronym.

I can’t seem to write the code for it although I have a pseudocode in mind.

```julia
get string
split at blank spaces and store in a list variable
iterate through splitted words in a list
get the first character
push into a FINAL string 
make the FINAL string all caps

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [December 7, 2019, 4:42pm UTC](https://discourse.julialang.org/t/help-with-strings/31979/2 "2019-12-07T16:42:24Z")

</div>

```julia
julia> sentence = "This is a sentence"
"This is a sentence"

julia> join([first(i) for i in split(sentence)])
"Tias"

```

---

<div class="post-metadata">

**Author:** ![PseudoCodeNerd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pseudocodenerd/32/11948_2.png) [@PseudoCodeNerd](https://discourse.julialang.org/u/PseudoCodeNerd)\
**Post date:** [December 7, 2019, 4:50pm UTC](https://discourse.julialang.org/t/help-with-strings/31979/4 "2019-12-07T16:50:06Z")

</div>

Thanks a ton !  
One more thing…  
What if a word in the sentence starts with some symbol  
like  
“I have a $five bill.”

How do I ignore that $ and take that “F” from five ?

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [December 7, 2019, 6:28pm UTC](https://discourse.julialang.org/t/help-with-strings/31979/5 "2019-12-07T18:28:59Z")

</div>

One way to do it is using a regex in place of the simple `first` function: [Strings · The Julia Language](https://docs.julialang.org/en/v1/manual/strings/#Regular-Expressions-1)

Alternatively, see if you can create a function yourself that returns the first alphanumeric character in a given string.
