Dear members,
I have a quick question and hope if you could kindly share your suggestions.
I'm trying to select words between parenthesis (i.e (Izmir). I've searched Geonet
for this specific task but ended up with no luck. I'm sending the screenshot
of the table. Thank you in advance.
Regards
Hi Omur,
You can accomplish this using a wildcard. For example, to do this with a feature class:
Place LIKE '%(Izmir)%'
See the section 'Search Strings' in the below link:
Building a query expression—Help | ArcGIS for Desktop
Hi Jake,
Thank you for your help. I just have one more question. How can I
copy all the words between parenthesis not only the selected records ?
Yes, after you make the selection use the syntax Darren specified in the field calculator.
!Place!.split('(')[1].split(')')[0]
Be sure to check 'Python' at the top of the Field Calculator.
Hello Jake,
Thank you for your suggestion. It worked . After I posted my original question I realized
that I also need to copy the words between the parenthesis to a new field. Could it be done
using Field Calculator ?
Hello Vince,
Please accept my apology for posting to wrong channel.
It has been moved.
edit: the following is to extract the word between parentheses. If you are looking to simply select features based on the word between parentheses, follow Jake's advice below.
Using Python in field calculator:
Basically, split your original string by the character '(', take the second part of that, split it by ')', and take the first part of that.
This forum is for help with GeoNet itself. In order to move this question to the correct forum you'll need to specify what Esri product you are using, the release of that product, and the programming language you are using.
- V
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.