Regex (gskinner) to extract words from a sentence -


i have string, hello~tim~call-me-when-you-are-back-at~+339280908998

there multiple fields in existing message. greeting=hello, name=tim, message=call-me-when-you-are-back-at, phone=+339280908998.

i.e, first word before occurrence of ~ greeting, , between first , second occurrence of ~ name, between third , fourth occurrence of ~ message , last word after final occurrence of ~ phone.

how extract these words.

thanks in advance.

yeah, can done, based on string in comment.

the regular expression need is: ^([^~]*?)~([^~]*?)~([^~]*?)~(.*?)$

here's link example: https://regex101.com/r/bw2cp7/2


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -