I work with JMeter and I need to get a link from the following <a href>
tag:
<a href="/i/info/14259.html" class="ogrLink">Department page</a>
So I need a regular expression for getting this result:
/i/info/14259.html
I have tried the following regex but not sure if it is correct:
i/info/[0-9]*.html
答案 0 :(得分:1)
点击此处查看演示: https://regex101.com/r/eR2oH3/24 选定的数据将是1美元变量。
答案 1 :(得分:0)
答案 2 :(得分:0)
下面是有效表达式:
val df = sc
.parallelize(Seq(
("username1", "friend1"),
("username1", "friend2"),
("username2", "friend1"),
("username2", "friend3")))
.toDF("username", "friend")
+---------+-------+
| username| friend|
+---------+-------+
|username1|friend1|
|username1|friend2|
|username2|friend1|
|username2|friend3|
+---------+-------+
val dfGRPD = df.map(Row => (Row(0), Row(1)))
.groupByKey()
.map{ case(username:String, groupOfFriends:Iterable[String]) => (username, groupOfFriends.mkString(","))}
.toDF("username", "groupOfFriends")
+---------+---------------+
| username| groupOfFriends|
+---------+---------------+
|username1|friend2,friend1|
|username2|friend3,friend1|
+---------+---------------+
&#13;
引用名称是存储链接值
的变量