What is the regex to remove (ISBN 8987983721) from the string, including ( a开发者_运维百科nd ) characters. I'm trying to do it with Bilk Rename Utility but can not succeed.
I provided (ISBN [0-9]*)() and \1\2 but insted everything is removed from the string except ISBN but I need the opposite effect
Javascript:
string = string.replace(/\(ISBN [^)]+\)/g, '')
PHP:
$string = preg_replace('/\(ISBN [^)]+\)/', '', $string);
sed:
string=$(sed 's/(ISBN [^)]\+)//g' <<< "$string")
Ruby:
string = string.gsub(/\(ISBN [^)]+\)/, '')
if you want to remove the ( and ):
(\(ISBN [0-9]*)\)
will give you the result with this test string:
Im testing to remove (ISBN 8987983721) from my string // Im testing to remove from my string
and depending on language you may want to use global replace so you remove all (ISBN xxxxx) texts
精彩评论