Start a new topic

RegEx to Pull Numbers Out of a Field

We were working with a client that was importing giving information from their web site, but the Fund field on the web site included miscellaneous text in front of the Fund number. With Regular Expressions and Import-O-Matic's dictionary translations, we were able to pull the Fund number from the field automatically, discarding all of the miscellaneous text in front of it. We just matched on the value "^.*?(?=\d{5}$)" (no double quotes) and specified the replacement value of "-BLANK-". This Regular Expression looks for everything but the last 5 digits of the field and replaces it with a blank, which leaves us just with the last 5 digits of the field. You can replace the 5 with the number of digits you need from the field.

image


1 Comment

This worked great, but I need another RegEx that will remove any number/symbol before the ":" symbol and leaving the remaining numbers after the ":" intact, any suggestions/ideas? Thanks.
Login or Signup to post a comment