[英]Regex to match the a string in a word, and that word must appear at the last word of the sentence
我想匹配應該在句子/行末尾的模式(即錯誤/異常)(有多行)。
前任:
ABC.sfgs.maxRetriesOnError(StringNameSpaceBinding)
ABC.jjg.clm.fg.sg(sd/ifgap|sgf.xml#sf)
NullPointerException
numberError
從上面的字符串中,它應該匹配 NullPointerException 和 numberError
我試過這個 -
(/\w*[eE]rror\s|\w*[eE]xception\s/)
,但它不能正常工作
試試這個:/.*([Ee]( /.*([Ee](?:xception|rror))$/gm
/gm
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.