# Removing characters from String

**URL:** https://discourse.julialang.org/t/removing-characters-from-string/53962
**Category:** General Usage
**Tags:** strings
**Created:** [January 26, 2021, 9:42am UTC](https://discourse.julialang.org/t/removing-characters-from-string/53962 "2021-01-26T09:42:27Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [January 26, 2021, 11:04am UTC](https://discourse.julialang.org/t/removing-characters-from-string/53962/4 "2021-01-26T11:04:53Z")

</div>

> [@LinasBa](#):
>
> since I want to remove only some parts of regex match.

You should explain this for better suggestions for your real problem.

So far, as it is still not clear, what exactly you try to do, I stay with guessing and take it as a given, that it is needed to work on the array of characters `collect(str)` and for this I propose this line:

```julia
cs=collect(str)
result=deleteat!(cs,findall(x -> x != nothing, match.(r,string.(cs))))

```

But I am also sure, that this is not what you should use, whatever real problem you try to solve.

---

_[View the full topic](https://discourse.julialang.org/t/removing-characters-from-string/53962)._
