Module talk:String
Add topicAppearance
Latest comment: 9 years ago by Cpiral in topic Pipe character handling and identifying
Archives
|
---|
Pipe character handling and identifying
[edit]How do I match a pipe character? How would one find, replace, position, find the length of, or repeat a string with a pipe character in it?
{{#invoke:String|match|[[page name and |its markup]]|[%a ]+.[%a ]+|nomatch = nope}}
--> page name and |its markup
So apparently
- dot can match the pipe character, but that's too vague.
- %a cannot match the pipe character, but can match square brackets.
- a pipe can be in the source string, but only if it's between double square brackets. (Len proves that.)
I need to extract a pagename and its markup from a wikilink.
Thanks,