本文由我司收集整编,推荐下载,如有疑问,请与我司联系
如何使用正则表达式获取括号内的内容?
如何使用正则表达式获取括号内的内容?[英]How to get content between the brackets using regex I would like to match the content inside the brackets but NOT return a match if another opening bracket is found (e.g., [abc]). The function /\[abc\](.*)\[\/abc\]/i would output:
 我希望匹配括号内的内容,但如果发现另一个开始括号(例如,[abc]),则不返回匹配项。功能/ \[abc \](. *)\[\ / abc \]/我将输出:
  12345 [abc] 67890 [/abc] But that’s not what i want, because there’s another opening bracket inside the text. The expected result would be:
 但这不是我想要的,因为比如[/abc],然后选择下一个数字。正则匹配括号里的内容
 tips:感谢大家的阅读,本文由我司收集整编。仅供参阅!

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。