0

I wanted to highlight/find string till '-' character

04,035 [1] INFO  - ascf
05,589 [1] INFO  - jtion
07,365 [1] INFO  - dbi
09,563 [1] INFO  - braho

what could be the regex pattern to find the string?

1 Answer 1

2

If you want to match everything up to the "-" character you could use:

^.*?-

enter image description here

Here is a great site for testing regexes:

https://regex101.com

Hope this helps. :-)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.