User:Utcursch/Migrate Infobox Indian Jurisdiction to Infobox settlement/main.js: Difference between revisions

Content deleted Content added
experimenting - remove native lang
m m
Line 68:
 
// extract lang-xyz template
var regex_indic_langregex_indic_script = /\({{lang[^{]*?({{[^}]*?}}[\s\S]*?)*}}\)/gmi
var arr_indic_lang_textarr_indic_script_text = orig_article_text.match(regex_indic_langregex_indic_script);
// lang-xyz found
if (arr_indic_lang_textarr_indic_script_text != null) {
// get indic_langindic_script text
var indic_lang_paramsindic_script_params = arr_indic_lang_textarr_indic_script_text[0].split("|");
 
native_name_lang = indic_lang_paramsindic_script_params[0].substr(8, (indic_lang_paramsindic_script_params[0]).length);
native_name = indic_lang_paramsindic_script_params[1].substr(0, (indic_lang_paramsindic_script_params[1]).length - 3);
 
orig_article_text = orig_article_text.replace(regex_coordregex_indic_script, "");
}