I’ve string like this [[English language|English]]. I tried to extract text from string. But no luck. I just Want to ignore text [[English language|.Output should be English.
Another example:
[[Stack Exchange|Question]] Output should be only Question
If there is no |
[[Stack Exchange]] Then output should be only Stack Exchange.
I’m new to regex. Will you please help me ? Thank you so much
This regex will do it.
RegExr.
The first capturing group will contain the text you want.