Replace Research References

Replace Research References

2
NewbieNewbie
2

    Apr 13, 2023#1

    I have to copy a large amount of medical texting containing references, including the example below. I would like to remove the references from the text which are in brackets e.g. [1], [2], [14,28]. I'd also like to remove the space just before the brackets, otherwise the sentence will have a space before the full stop. Could you please tell me how I could do it? I haven't been able to figure it out using your guides.

    Pharmacologic treatment of advanced CKD (eGFR <30 mL/min/1.73 m2) — Our pharmacologic approach is adapted from the World Health Organization (WHO) analgesic ladder, which involves a cautious, stepwise approach to prescribing analgesic agents according to pain severity (figure 1) [31-33]. According to the WHO analgesic ladder, mild pain is treated with nonopioid analgesic agents (tier 1), moderate pain is treated with a weak opioid with or without a nonopioid agent (tier 2), and severe pain is treated with a strong opioid (tier 3) (table 2 and figure 1) [34]. The WHO ladder is modified for patients with CKD since many specific agents (such as codeine and tramadol) should not be used for individuals with a severely reduced estimated glomerular filtration rate (eGFR) (table 2) [31,35]. Systematic reviews for nonmalignant chronic pain have supported use of the WHO analgesic ladder approach in the general [29,36-43] and geriatric [44] populations. Most palliative care consensus groups with expertise in caring for CKD patients advocate for this approach [14,28,31,33,45-56].
     

    6,687586
    Grand MasterGrand Master
    6,687586

      Apr 13, 2023#2

      Search with the Unix or Perl regular expression engine of UltraEdit for " *\[[\d\-,]+\]" without the double quotes used here just to let you see that the search expression starts with a space character and use an empty replace string.

      There can be used also the UltraEdit regular expression search string " ++^[[0-9^-,]+^]" also without the double quotes and again an empty replace string.

      Please note that these two regular expressions remove only zero or more normal spaces left to a reference, but not a no-break space or other whitespace characters. It is possible to use with the most powerful Perl regular expression engine \s instead of the space character at beginning of the search string to match any whitespace zero or more times according to Unicode standard including vertical whitespaces like carriage return and line-feed.
      Best regards from an UC/UE/UES for Windows user from Austria

      19176
      MasterMaster
      19176

        Apr 14, 2023#3

        Hi Jarva,

        Mofi's regexes are ok but if you want to use a more exact pattern then the following one (Perl syntax) could be useful. And it also demonstrates the use of DEFINE ;)

        F:  (?(DEFINE)(?<refnum>\d+(?:-\d+)?)) +\[(?&refnum)(?:,(?&refnum))*\]
        R: <leave it empty>

        This pattern respects the inner structure of references.

        BR, Fleggy

        2
        NewbieNewbie
        2

          Apr 22, 2023#4

          Thank you both! I've tried it and they work. I really appreciate it