Hey there, I’ll the screenshot of a data string, I want to extract the name from it, can anyone show me visually on how to do that
Hey @Fahad_Sheji
You can use a Text Parser module to get the name, which will look like this:
(?<=Name)(.*)(?=Email)
Make sure to have single line as true
Hey, I tried the regex pattern and it brought the name and the ": " that before the name as well.
How can I avoid it
You can do this with regex, (ill let @make_expert circle back with that answer, I never got around to mastering regex)
with this remainder.
assuming the space in your quote was accurate, trim deals with that
replace can remove the colon, assuming no names have colons in them.
looks quite interesting but since am new to all this, I am a bit confused,
could you visually show me how can use the trim and replace you said to remove ": "
Imagine in place of my google sheets module, that is where your data is being input in trello.
This
Turned into this.
Spaces at the start and end of the string were removed by trim()
colon, was replaced with an emptystring (which means no data in this case)
with replace()
My solution though, while it technically works, and gets you back to building for now.
When @make_expert is back with advice on how to modify the regex, that is probably the better route.
Hi @Fahad_Sheji
Here’s the regex you will need (?<=Name:)(.*)(?=Email)
Thanks a lot @make_expert it worked.
I have 2 questions for you
-
How can I learn to create such regex pattern, whats the best way/course and how did you learn it
-
Suppose text parser didn’t exist, what other way do I have to extract a data from the string
Since you asked:
1.
Just search whatever your question with regex keyword, like “text between two chararcter regex” in google to get the snippet
- You can use split formula as well.
There is so much truth here i want to cry
made my day man waking up to this