• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Regex – Extract string between characters if they exist

Resolved: Regex – Extract string between characters if they exist

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I would need to use RegEx to extract a string between characters if they exist (The colon character).
Examples:
  • SX: 22AA 001 267
  • 2294 0BB 267: 09
  • 2294 0CC 267

In all cases, I want the result.
Thank you all.

Answer:

You can use this regex to match them all
NOTE: As you did not mention what language you’re using I decided to not use lookarounds. So you have to get the first group from the match.

If you have better answer, please add a comment about this, thank you!

between extract regex string
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: VBA – Applying border around the areas with value/text

01/04/2023

Resolved: How can I implement a function depending on picked up items?

01/04/2023

Resolved: Azuer Service Bus SDK not receiving the specified messages

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.