I am looking for a regular expression that will look for Apostrophe in a string. The string can be a sentence too. I tried a simple regex like (‘) but it only checks for one character in a string. How to I check for the entire string.
For example.
"Hello! I have many PC's"
will be a match”
but
"@#%@^@&%@!%!::"";[] I dont have any PCs)"
will be a mismatch (basically any character except Apostrophe)”
Thanks
so you’re looking to see if any string has an apostrophe,
.*["'].*would match the entire string that contained an apostrophe and["']would match just the apostrophes say if you wanted to replace them or whatever and something like this^["']\w+["']to match just your first case.