A
A
Anton2018-02-16 10:22:48
Regular Expressions
Anton, 2018-02-16 10:22:48

How to write a regular expression?

Hello. For example, there is such a line: "word1 word2 -minus1 word3.1-word3.2 -minus phrase -minus2", how can you find all the word and phrases that begin with a minus, given that there can also be words with a hyphen?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nick Sdk, 2018-02-16
Reytarovsky @Antonchik

"word1 word2 -minus1 word3.1-word3.2 -minus phrase -minus2"

like this?
https://regex101.com/r/4YJtau/1

D
Dmitry Bashinsky, 2018-02-16
@BashkaMen

https://regex101.com/r/4YJtau/3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question