F
F
FlatUser2020-05-05 15:41:47
Regular Expressions
FlatUser, 2020-05-05 15:41:47

How to write a regular expression (find all words ignoring what's in between)?

There is such a line.

organizationName (X.520 DN component)    UTF8String  Apple inc.  end


Should get it.
Apple inc. 
How it should work:
-> find organizationName
[ignore any characters between]
-> find UTF8String
/ make a marker at the end of UTF8String--->| Apple Inc. |<---end and at the beginning of the word end
-> Get the phrase Apple inc.

my regex selects everything completely
organizationName(.*?)UTF8String(.*?)end

How can I create a regex that starts from words and ignores interlines?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
ClownSergo, 2020-05-05
@FlatUser

Your regex is working. Just "Apple inc." is in the second group.
https://regex101.com/r/dKyASJ/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question