How do I only show dynamic texts between parentheses? for example, Mcdonalds (MCD)
I want to only display MCD, and not the whole text.
How do I only show dynamic texts between parentheses? for example, Mcdonalds (MCD)
I want to only display MCD, and not the whole text.
Regex. Is that built in?
but how do I do it? yes regrex is available.
what I wanna do is extract the value of the search input and find the string between the parentheses and display the new text on a repeating group. I don’t want to show the whole text
is there a way to use regrex cuz I have never used this feature before
I don’t know regex that well, I hope someone that does can chime in. Maybe this will work:
\(([^)]*)\)
\( # Escaped parenthesis, means "starts with a '(' character"
( # Parentheses in a regex mean "put (capture) the stuff
# in between into the Groups array"
[^)] # Any character that is not a ')' character
* # Zero or more occurrences of the aforementioned "non ')' char"
) # Close the capturing group
\) # "Ends with a ')' character"
Hope that helps!
so this worked but I don’t wannt show the parentheses
Hmm. Well I don’t know regex very well but you can do a ‘find and replace’ to remove the parentheses.
Maybe someone can chime in to tell you how to do it in one step if they know regex.
Thank you I have achieved the purpose but not exactly what I wanted it. It seems like when I use the rich text the regrex removes the text.
Wow - how did you figure that out?!
I have copied the expression
(([^)]*)) in the regex and then used find&place to eliminate parentheses
So it works now? Did you get everything in the right order?
I was hoping to underline and bold the regex, but could not do it. do you have any idea how to do that. However, I have done the part of extraction the string between the parentheses
Sure. Click on rich text editor just below the text, if you need to bold just a part of the text. Or just add this:
[b] your text goes here [/b]
I might not have explained it well. I was able to extract what is inside the parentheses when the search input is empty but when the input is not empty what I was able to do was underlined and boded the searched value, however other names on the list were not extracted.
I was even able to bold and underline the searched value but other names on the list were not extracted properly. Extraction means getting the string between the parentheses.
what about reordering the list to show the searched value? I want for example to show writing at the beginning instead of its original position for better user experience.
Are you using the Search & Autocorrect Plugin?
I didn’t realize you were doing this for a search. This plugin might help.