A
A
Anton2018-02-20 18:33:32
Regular Expressions
Anton, 2018-02-20 18:33:32

All characters except dots?

How to find all characters except two dots in a row?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2018-02-20
@Azperin

Here, unfortunately, the language is not specified, but when it comes to searching for something in the string that needs to be removed or separated, it is best to simply replace the search subject. I will assume that the language is still JS, respectively, as in any other, a string is just an array of characters, so all you need to do is get rid of these dots.

var str = 'abcabc..ba....bc'; 
str.replace(/\.\./g, '-');
//abcabc-ba--bc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question