Skip to content

Instantly share code, notes, and snippets.

@babuilyas
Last active September 29, 2022 06:15
Show Gist options
  • Select an option

  • Save babuilyas/d1132f9f81e74740be4be91c06b4bdd1 to your computer and use it in GitHub Desktop.

Select an option

Save babuilyas/d1132f9f81e74740be4be91c06b4bdd1 to your computer and use it in GitHub Desktop.
Regex quick snippets
find and replace a character in text comparing leading and trailing text.
(?<=\d+),(?=\d+)
Demo:
https://regex101.com/r/eINbxm/1
find and replace comments in the end of abap code after period.
(?!.\S)(".+)
Sample data:
append 'ActualDeliveryRoute' to LT_FIELDNAMES. " 'ACTUALDELIVERYROUTE' ).
append 'ActualDeliveryRoute' to LT_FIELDNAMES.
append 'ActualGoodsMovementDate' to LT_FIELDNAMES. " 'ACTUALGOODSMOVEMENTDATE' ).
append 'ActualGoodsMovementTime' to LT_FIELDNAMES. " 'ACTUALGOODSMOVEMENTTIME' ).
append 'BillingDocumentDate' to LT_FIELDNAMES. " 'BILLINGDOCUMENTDATE' ).
append 'BillOfLading' to LT_FIELDNAMES. " 'BILLOFLADING' ).
append 'CompleteDeliveryIsDefined' to LT_FIELDNAMES. " 'COMPLETEDELIVERYISDEFINED' ).
append 'ConfirmationTime' to LT_FIELDNAMES. " 'CONFIRMATIONTIME' ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment