Example
#{example}"); ipb.editor_values.get('templates')['togglesource'] = new Template(""); ipb.editor_values.get('templates')['toolbar'] = new Template(""); ipb.editor_values.get('templates')['button'] = new Template("
Emoticons
"); // Add smilies into the mix ipb.editor_values.set( 'show_emoticon_link', false ); ipb.editor_values.set( 'bbcodes', $H({"snapback":{"id":"1","title":"Post Snap Back","desc":"This tag displays a little linked image which links back to a post - used when quoting posts from the board. Opens in same window by default.","tag":"snapback","useoption":"0","example":"[snapback]100[/snapback]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"topic":{"id":"5","title":"Topic Link","desc":"This tag provides an easy way to link to a topic","tag":"topic","useoption":"1","example":"[topic=1]Click me![/topic]","switch_option":"0","menu_option_text":"Enter the topic ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"post":{"id":"6","title":"Post Link","desc":"This tag provides an easy way to link to a post.","tag":"post","useoption":"1","example":"[post=1]Click me![/post]","switch_option":"0","menu_option_text":"Enter the Post ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"spoiler":{"id":"7","title":"Spoiler","desc":"Spoiler tag","tag":"spoiler","useoption":"0","example":"[spoiler]Some hidden text[/spoiler]","switch_option":"0","menu_option_text":"","menu_content_text":"Enter the text to be masked","single_tag":"0","optional_option":"0","image":""},"acronym":{"id":"8","title":"Acronym","desc":"Allows you to make an acronym that will display a description when moused over","tag":"acronym","useoption":"1","example":"[acronym='Laugh Out Loud']lol[/acronym]","switch_option":"0","menu_option_text":"Enter the description for this acronym (EG: Laugh Out Loud)","menu_content_text":"Enter the acronym (EG: lol)","single_tag":"0","optional_option":"0","image":""},"hr":{"id":"12","title":"Horizontal Rule","desc":"Adds a horizontal rule to separate text","tag":"hr","useoption":"0","example":"[hr]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"1","optional_option":"0","image":""},"php":{"id":"14","title":"PHP Code","desc":"Allows you to enter PHP code into a formatted/highlighted syntax box","tag":"php","useoption":"0","example":"[php]$variable = true;\n\nprint_r($variable);[/php]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"html":{"id":"15","title":"HTML Code","desc":"Allows you to enter formatted/syntax-highlighted HTML code","tag":"html","useoption":"0","example":"[html]\n \n[/html]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"sql":{"id":"16","title":"SQL Code","desc":"Allows you to enter formatted/syntax-highlighted SQL code","tag":"sql","useoption":"0","example":"[sql]SELECT p.*, t.* FROM posts p LEFT JOIN topics t ON t.tid=p.topic_id WHERE t.tid=7[/sql]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"xml":{"id":"17","title":"XML Code","desc":"Allows you to enter formatted/syntax-highlighted XML code","tag":"xml","useoption":"0","example":"[xml]2 Replies - 49 Views - Last Post: Today, 04:35 AM
#1
Reputation: 0
- Posts: 1
- Joined: Yesterday, 10:38 PM
Posted Yesterday, 10:40 PM
Hi everyone,If strWhole = "AB,C_,E*" and strPart1 = "CD",
how to write check condition (like IndexOf/Ismatch) to match "CD" with "C_", without using loop?
Thanks.
Replies To: Match condition
#2
Reputation: 1678
- Posts: 4,889
- Joined: 05-May 12
Re: Match condition
Posted Yesterday, 11:36 PM
Why are you trying to avoid a loop?
#3
Reputation: 1612
- Posts: 2,412
- Joined: 21-June 11
Re: Match condition
Posted Today, 04:35 AM
You didn't really explain the semantics of your pattern string, so I'm going to have to make some assumptions: I'm assuming that you're separating multiple possible patterns using the commas, that "_" stands for "any character" and "*" stands for "0 or more of any character". If so you can convert your pattern into a regular expression by replacing "," with "|", "_" with "." and "*" with ".*".? Once you've done so, you can use the usual regex matching methods to find out whether any given string matches the pattern.? You might also want to Regex.Escape your pattern before performing the replacements if your pattern may contain characters that have a special meaning in regular expressions, but not in your pattern syntax - like dots for example.
This post has been edited by sepp2k: Today, 04:39 AM
Page 1 of 1
Source: http://www.dreamincode.net/forums/topic/315373-match-condition/
masters par 3 contest google augmented reality glasses wonderlic test texas tornado fantasy baseball jared sullinger jaleel white
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন