using System.Text.RegularExpressions; //step2: extract expected info //<h1 class="h1user">crifan</h1> string h1userP = @"<h1\s+class=""h1user"">(?<h1user>.+?)</h1>"; Match foundH1user =
最近,做项目中有一个需求,页面中有一个文本编辑器,里面写的内容最后生成了html代码片段,在另一个页面需要前一个页面文本编辑器的html代码片段中的a标签的href值,就尝试做了,因为不太熟悉js,所以花费了几十分钟完成,如下是我的代码,请大家指点,哪里需要优化,也可以参照: function getHrefValue(){ var arr = null; var playText = $("input[type='hidden']").val(); if(playText.index