import re
captions = [
"Figure 1: Path of Reading Materials from the Web to a Student." ,
"FIGURE 1 - Travel CP-net" ,
"Figure 1 Interpretation as abduction, the big picture." ,
"Fig. 1. The feature vector components" ,
"Fig 1: IMAGACT Log-in Page" ,
"FIG 1 ; The effect of descriptive and interpretive information, and Inclination o f Fit" ,
"FIGURE 1 – The system diagram"
]
for caption in captions:
caption = re .sub ( r'\b fig\. ?(?:ure)? 1[^\S \r \n ]*[:.;–-]?[^\S \r \n ]' , '' , caption, flags= re .IGNORECASE )
print ( caption)
aW1wb3J0IHJlCgpjYXB0aW9ucyA9IFsKICAgICJGaWd1cmUgMTogUGF0aCBvZiBSZWFkaW5nIE1hdGVyaWFscyBmcm9tIHRoZSBXZWIgdG8gYSBTdHVkZW50LiIsCiAgICAiRklHVVJFIDEgLSBUcmF2ZWwgQ1AtbmV0IiwKICAgICJGaWd1cmUgMSBJbnRlcnByZXRhdGlvbiBhcyBhYmR1Y3Rpb24sIHRoZSBiaWcgcGljdHVyZS4iLAogICAgIkZpZy4gMS4gVGhlIGZlYXR1cmUgdmVjdG9yIGNvbXBvbmVudHMiLAogICAgIkZpZyAxOiBJTUFHQUNUIExvZy1pbiBQYWdlIiwKICAgICJGSUcgMSA7IFRoZSBlZmZlY3Qgb2YgZGVzY3JpcHRpdmUgYW5kIGludGVycHJldGl2ZSBpbmZvcm1hdGlvbiwgYW5kIEluY2xpbmF0aW9uIG8gZiBGaXQiLAogICAgIkZJR1VSRSAxIOKAkyBUaGUgc3lzdGVtIGRpYWdyYW0iCl0KCmZvciBjYXB0aW9uIGluIGNhcHRpb25zOgogICAgY2FwdGlvbiA9IHJlLnN1YihyJ1xiZmlnXC4/KD86dXJlKT8gMVteXFNcclxuXSpbOi474oCTLV0/W15cU1xyXG5dJywgJycsIGNhcHRpb24sIGZsYWdzPXJlLklHTk9SRUNBU0UpCiAgICBwcmludChjYXB0aW9uKQ==