我如何使用正则表达式?
about in what situations i can use it ?
答案 0 :(得分:2)
<?php
preg_match("/(wmsAuthSign\=[^\&]+)/", $your_string, $matches);
?>
<script data-cfasync='false' type='text/javascript'>
jwplayer('playerjxJRqLMFuJaA').setup({
file: 'http://127.0.0.1:8081/live/ssport/playlist.m3u8?<?php echo $matches[1]; ?>',
aboutlink: '',
controls: 'true',
title: 'Live Stream',
width: '890',
height: '640',
stretching: 'exactfit',
autostart: 'true',
primary: 'flash',
skin: 'bekle',
androidhls: 'true'
});
</script>